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() {
// waScaleManager.applyNewSize();
gameManager.init(this.scene).then((nextSceneName) => {
// Let's rescale before starting the game
// We can do it at this stage.
waScaleManager.applyNewSize();
this.scene.start(nextSceneName);
}).catch((err) => {

View file

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