diff --git a/src/shattered_sword/Scenes/Greatwall.ts b/src/shattered_sword/Scenes/Greatwall.ts index 0cfa88f..6c1593e 100644 --- a/src/shattered_sword/Scenes/Greatwall.ts +++ b/src/shattered_sword/Scenes/Greatwall.ts @@ -12,6 +12,7 @@ import AABB from "../../Wolfie2D/DataTypes/Shapes/AABB"; import EnemyAI from "../AI/EnemyAI"; import BattlerAI from "../AI/BattlerAI"; import InputWrapper from "../Tools/InputWrapper"; +import Snow from "./Snow"; export default class Greatwall extends GameLevel { loadScene(): void { @@ -42,7 +43,7 @@ export default class Greatwall extends GameLevel { ] } } - this.sceneManager.changeToScene(Greatwall, {}, sceneOptions); + this.sceneManager.changeToScene(Snow, {}, sceneOptions); } protected playStartStory(): void { diff --git a/src/shattered_sword/Scenes/Snow.ts b/src/shattered_sword/Scenes/Snow.ts index 1dd8b95..63a3cf5 100644 --- a/src/shattered_sword/Scenes/Snow.ts +++ b/src/shattered_sword/Scenes/Snow.ts @@ -12,6 +12,7 @@ import AABB from "../../Wolfie2D/DataTypes/Shapes/AABB"; import EnemyAI from "../AI/EnemyAI"; import BattlerAI from "../AI/BattlerAI"; import InputWrapper from "../Tools/InputWrapper"; +import Market from "./Market"; export default class Snow extends GameLevel { loadScene(): void { @@ -29,4 +30,37 @@ export default class Snow extends GameLevel { //load music here } + + protected goToNextLevel(): void { + this.viewport.setZoomLevel(1); + let sceneOptions = { + physics: { + groupNames: ["ground", "player", "enemies"], + collisions: + [ + [0, 1, 1], + [1, 0, 0], + [1, 0, 0] + ] + } + } + this.sceneManager.changeToScene(Market, {}, sceneOptions); + } + + protected playStartStory(): void { + if (!this.touchedStartCheckPoint) { + this.touchedStartCheckPoint = true; + this.storyLoader("shattered_sword_assets/jsons/level1story.json"); + this.startTimer(); + } + } + + protected playEndStory() { + if (!this.touchedEndCheckPoint) { + this.touchedEndCheckPoint = true; + this.storyLoader("shattered_sword_assets/jsons/story.json"); + this.endTimer(); + this.levelEnded = true; + } + } } \ No newline at end of file