diff --git a/src/main.js b/src/main.js index 849ba39..7d1abee 100644 --- a/src/main.js +++ b/src/main.js @@ -1260,6 +1260,10 @@ class HouseScene extends Phaser.Scene { class PlayableLevelScene extends Phaser.Scene { constructor(key) { super(key) + this.resetLevelRuntime() + } + + resetLevelRuntime() { this.playerDragging = false this.playerDragTargetX = null this.lastDragX = null @@ -1475,6 +1479,7 @@ class RoomScene extends PlayableLevelScene { } init(data) { + this.resetLevelRuntime() this.roomId = data?.roomId ?? 'living' } @@ -1565,6 +1570,10 @@ class RoofScene extends PlayableLevelScene { super('RoofScene') } + init() { + this.resetLevelRuntime() + } + create() { const worldWidth = 2900 const groundY = 1370 @@ -1639,7 +1648,7 @@ const game = new Phaser.Game({ }) window.__DOLLHOUSE__ = { - version: '0.12.0', + version: '0.12.1', game, async resetAll() { await clearGameState()