Browse code

avoid bunny check bug when restarting level

devnewton authored on 06/11/2016 15:53:36
Showing 1 changed files
... ...
@@ -22,7 +22,7 @@ export class Level extends AbstractState {
22 22
     pathfinder: Pathfinder;
23 23
     damageResolver: DamageResolver;
24 24
     bunnyGroup: Phaser.Group;
25
-    shouldCheckBunnyLiving = false;
25
+    shouldCheckBunnyLiving: boolean;
26 26
 
27 27
     constructor() {
28 28
         super();
... ...
@@ -91,6 +91,8 @@ export class Level extends AbstractState {
91 91
 
92 92
         this.bunnyGroup = this.game.add.group();
93 93
 
94
+        this.shouldCheckBunnyLiving = false;
95
+
94 96
         this.startDialog();
95 97
     }
96 98