|
@@ -38,7 +38,8 @@ const endState = {
|
|
|
0,
|
|
|
colors.greenNeon,
|
|
|
0.5
|
|
|
- ); // Progress
|
|
|
+ );
|
|
|
+ // Progress
|
|
|
game.add.geom.rect(661, 11, 149, 34, colors.blue, 3, undefined, 1); // Box
|
|
|
game.add.text(820, 38, '100%', textStyles.h2_blueDark).align = 'left';
|
|
|
game.add.text(
|
|
@@ -50,63 +51,21 @@ const endState = {
|
|
|
|
|
|
game.add.image(360, 545, 'tree4', 0.7).anchor(0, 1);
|
|
|
|
|
|
- // Level character
|
|
|
- switch (gameName) {
|
|
|
- case 'circleOne':
|
|
|
- this.preAnimate = true;
|
|
|
- this.animate = false;
|
|
|
-
|
|
|
- // School
|
|
|
- game.add.image(600, 222, 'school', 0.7);
|
|
|
-
|
|
|
- // Kid
|
|
|
- this.character = game.add.sprite(0, -152, 'kid_run', 0, 0.7);
|
|
|
- this.character.anchor(0.5, 0.5);
|
|
|
- this.character.animation = [
|
|
|
- 'move',
|
|
|
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
|
- 3,
|
|
|
- ];
|
|
|
-
|
|
|
- // Balloon
|
|
|
- this.balloon = game.add.image(0, -260, 'balloon');
|
|
|
- this.balloon.anchor(0.5, 0.5);
|
|
|
-
|
|
|
- this.basket = game.add.image(0, -150, 'balloon_basket');
|
|
|
- this.basket.anchor(0.5, 0.5);
|
|
|
-
|
|
|
- break;
|
|
|
-
|
|
|
- case 'squareTwo':
|
|
|
- // School
|
|
|
- game.add.image(600, 222, 'school', 0.7);
|
|
|
-
|
|
|
- // Kid
|
|
|
- this.character = game.add.sprite(0, 460, 'kid_run', 6, 0.7);
|
|
|
- this.character.anchor(0.5, 0.5);
|
|
|
- this.character.animation = [
|
|
|
- 'move',
|
|
|
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
|
|
|
- 3,
|
|
|
- ];
|
|
|
-
|
|
|
- break;
|
|
|
-
|
|
|
- case 'squareOne':
|
|
|
- // Farm
|
|
|
- game.add.image(650, 260, 'farm', 1.1);
|
|
|
-
|
|
|
- // Tractor
|
|
|
- this.character = game.add.sprite(0, 490, 'tractor', 0, 0.7);
|
|
|
- this.character.anchor(0.5, 0.5);
|
|
|
- if (gameOperation == 'Plus') {
|
|
|
- this.character.animation = ['move', [0, 1, 2, 3, 4], 4];
|
|
|
- } else {
|
|
|
- this.character.curFrame = 10;
|
|
|
- this.character.animation = ['move', [10, 11, 12, 13, 14], 4];
|
|
|
- }
|
|
|
+ gameList[gameId].assets.endBuilding();
|
|
|
+
|
|
|
+ this.character = gameList[gameId].assets.endCharacter();
|
|
|
+ this.character.animation = gameList[gameId].assets.endCharacterAnimation();
|
|
|
+
|
|
|
+ if (gameName === 'circleOne') {
|
|
|
+ this.preAnimate = true;
|
|
|
+ this.animate = false;
|
|
|
+
|
|
|
+ // Balloon
|
|
|
+ this.balloon = game.add.image(0, -260, 'balloon');
|
|
|
+ this.balloon.anchor(0.5, 0.5);
|
|
|
|
|
|
- break;
|
|
|
+ this.basket = game.add.image(0, -150, 'balloon_basket');
|
|
|
+ this.basket.anchor(0.5, 0.5);
|
|
|
}
|
|
|
|
|
|
if (this.animate) game.animation.play(this.character.animation[0]);
|