Fixing broken resize

This commit is contained in:
David Négrier 2021-05-05 09:51:04 +02:00
parent f66e69cb75
commit a6ad1674e3
2 changed files with 2 additions and 2 deletions

View File

@ -18,9 +18,10 @@ export class EntryScene extends Scene {
} }
create() { create() {
// waScaleManager.applyNewSize();
gameManager.init(this.scene).then((nextSceneName) => { gameManager.init(this.scene).then((nextSceneName) => {
// Let's rescale before starting the game
// We can do it at this stage.
waScaleManager.applyNewSize(); waScaleManager.applyNewSize();
this.scene.start(nextSceneName); this.scene.start(nextSceneName);
}).catch((err) => { }).catch((err) => {

View File

@ -114,7 +114,6 @@ const config: GameConfig = {
const game = new Phaser.Game(config); const game = new Phaser.Game(config);
waScaleManager.setScaleManager(game.scale); waScaleManager.setScaleManager(game.scale);
waScaleManager.applyNewSize();
window.addEventListener('resize', function (event) { window.addEventListener('resize', function (event) {
coWebsiteManager.resetStyle(); coWebsiteManager.resetStyle();