Browse Source

added ability to cancel background transition tweens when switching modes

develop
Rob Colbert 2 years ago
parent
commit
f46606289b
  1. 11
      game/js/lib/game-background.js
  2. 4
      yarn.lock

11
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();

4
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"

Loading…
Cancel
Save