add end story to all levels

This commit is contained in:
Kelly Peng 2022-05-09 15:02:24 -04:00
parent 70c72adb33
commit 61587a46c4
10 changed files with 255 additions and 8 deletions

View File

@ -2,7 +2,7 @@
"texts": [ "texts": [
{ {
"speaker": "", "speaker": "",
"content": "Hiro gained one more piece of sword!", "content": "Hiro collected one more piece of sword!",
"actions": [ "actions": [
{ {
"type": "loadSprite", "type": "loadSprite",
@ -36,8 +36,8 @@
150 150
], ],
"scale": [ "scale": [
2, 3,
2 3
] ]
} }
] ]

View File

@ -0,0 +1,56 @@
{
"texts": [
{
"speaker": "",
"content": "Hiro collected one more piece of sword!",
"actions": [
{
"type": "loadSprite",
"key": "collect",
"path": "shattered_sword_assets/images/collect2.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Congrats! You can choose buff to gain from completing this level!",
"actions": [
{
"type": "hideSprite",
"key": "collect"
},
{
"type": "loadSprite",
"key": "buff",
"path": "shattered_sword_assets/images/buff.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Let's move on to the next level!",
"actions": [
{
"type": "hideSprite",
"key": "buff"
}
]
}
]
}

View File

@ -0,0 +1,56 @@
{
"texts": [
{
"speaker": "",
"content": "Hiro collected one more piece of sword!",
"actions": [
{
"type": "loadSprite",
"key": "collect",
"path": "shattered_sword_assets/images/collect3.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Congrats! You can choose buff to gain from completing this level!",
"actions": [
{
"type": "hideSprite",
"key": "collect"
},
{
"type": "loadSprite",
"key": "buff",
"path": "shattered_sword_assets/images/buff.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Let's move on to the next level!",
"actions": [
{
"type": "hideSprite",
"key": "buff"
}
]
}
]
}

View File

@ -0,0 +1,56 @@
{
"texts": [
{
"speaker": "",
"content": "Hiro collected one more piece of sword!",
"actions": [
{
"type": "loadSprite",
"key": "collect",
"path": "shattered_sword_assets/images/collect4.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Congrats! You can choose buff to gain from completing this level!",
"actions": [
{
"type": "hideSprite",
"key": "collect"
},
{
"type": "loadSprite",
"key": "buff",
"path": "shattered_sword_assets/images/buff.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Let's move on to the next level!",
"actions": [
{
"type": "hideSprite",
"key": "buff"
}
]
}
]
}

View File

@ -0,0 +1,79 @@
{
"texts": [
{
"speaker": "",
"content": "Hiro collected one more piece of sword!",
"actions": [
{
"type": "loadSprite",
"key": "collect",
"path": "shattered_sword_assets/images/collect5.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Now, Hiro has restored the sword back. It's time to kill the dragon and save the kingdom!!",
"actions": [
{
"type": "hideSprite",
"key": "collect"
},
{
"type": "loadSprite",
"key": "complete",
"path": "shattered_sword_assets/images/complete.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "You can choose buff to gain from completing this level!",
"actions": [
{
"type": "hideSprite",
"key": "complete"
},
{
"type": "loadSprite",
"key": "buff",
"path": "shattered_sword_assets/images/buff.png",
"positon": [
300,
150
],
"scale": [
3,
3
]
}
]
},
{
"speaker": "",
"content": "Let's move on to the next level!",
"actions": [
{
"type": "hideSprite",
"key": "buff"
}
]
}
]
}

View File

@ -61,7 +61,7 @@ export default class Forest extends GameLevel {
protected playEndStory() { protected playEndStory() {
if (!this.touchedEndCheckPoint) { if (!this.touchedEndCheckPoint) {
this.touchedEndCheckPoint = true; this.touchedEndCheckPoint = true;
this.storyLoader("shattered_sword_assets/jsons/story.json"); this.storyLoader("shattered_sword_assets/jsons/level1endstory.json");
this.endTimer(); this.endTimer();
this.levelEnded = true; this.levelEnded = true;
} }

View File

@ -58,7 +58,7 @@ export default class Greatwall extends GameLevel {
protected playEndStory() { protected playEndStory() {
if (!this.touchedEndCheckPoint) { if (!this.touchedEndCheckPoint) {
this.touchedEndCheckPoint = true; this.touchedEndCheckPoint = true;
this.storyLoader("shattered_sword_assets/jsons/story.json"); this.storyLoader("shattered_sword_assets/jsons/level3endstory.json");
this.endTimer(); this.endTimer();
this.levelEnded = true; this.levelEnded = true;
} }

View File

@ -57,7 +57,7 @@ export default class Market extends GameLevel {
protected playEndStory() { protected playEndStory() {
if (!this.touchedEndCheckPoint) { if (!this.touchedEndCheckPoint) {
this.touchedEndCheckPoint = true; this.touchedEndCheckPoint = true;
this.storyLoader("shattered_sword_assets/jsons/story.json"); this.storyLoader("shattered_sword_assets/jsons/level5endstory.json");
this.endTimer(); this.endTimer();
this.levelEnded = true; this.levelEnded = true;
} }

View File

@ -53,7 +53,7 @@ export default class Porcelain extends GameLevel {
protected playEndStory() { protected playEndStory() {
if (!this.touchedEndCheckPoint) { if (!this.touchedEndCheckPoint) {
this.touchedEndCheckPoint = true; this.touchedEndCheckPoint = true;
this.storyLoader("shattered_sword_assets/jsons/story.json"); this.storyLoader("shattered_sword_assets/jsons/level2endstory.json");
this.endTimer(); this.endTimer();
this.levelEnded = true; this.levelEnded = true;
} }

View File

@ -59,7 +59,7 @@ export default class Snow extends GameLevel {
protected playEndStory() { protected playEndStory() {
if (!this.touchedEndCheckPoint) { if (!this.touchedEndCheckPoint) {
this.touchedEndCheckPoint = true; this.touchedEndCheckPoint = true;
this.storyLoader("shattered_sword_assets/jsons/story.json"); this.storyLoader("shattered_sword_assets/jsons/level4endstory.json");
this.endTimer(); this.endTimer();
this.levelEnded = true; this.levelEnded = true;
} }