Fixing broken resize
This commit is contained in:
parent
f66e69cb75
commit
a6ad1674e3
@ -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) => {
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user