diff --git a/game/js/lib/game-background.js b/game/js/lib/game-background.js index ca2651d..a93f64f 100644 --- a/game/js/lib/game-background.js +++ b/game/js/lib/game-background.js @@ -385,6 +385,15 @@ export default class GameBackground { setMode (mode) { this.mode = mode; + + delete this.butterfly; + + this.tweens.foregroundIn.stop(); + this.tweens.treeLeftIn.stop(); + this.tweens.treeRightIn.stop(); + this.tweens.plantLeftIn.stop(); + this.tweens.plantRightIn.stop(); + switch (this.mode) { case 'story': this.tweens.foregroundIn.delay(2000).run(); @@ -403,8 +412,6 @@ export default class GameBackground { break; case 'play': - delete this.butterfly; - this.tweens.foregroundOut.run(); this.tweens.treeLeftOut.run(); this.tweens.treeRightOut.run(); diff --git a/yarn.lock b/yarn.lock index d3471f3..d9d1fd5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -833,8 +833,8 @@ dotenv@^16.0.0: integrity sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q== "dtp-nice-game@https://git.digitaltelepresence.com/digital-telepresence/dtp-nice-game.git": - version "0.1.14" - resolved "https://git.digitaltelepresence.com/digital-telepresence/dtp-nice-game.git#651049ff47414696381d8dddc85ba21bc954e632" + version "0.1.15" + resolved "https://git.digitaltelepresence.com/digital-telepresence/dtp-nice-game.git#d8797ca35ef6d7643d57a7159b1fc5bba0aeaff8" dependencies: jshint "^2.13.4"