From c62be6235393083568c451ff5c4c9afebba71f84 Mon Sep 17 00:00:00 2001 From: Renge Date: Mon, 9 May 2022 11:21:54 -0400 Subject: [PATCH] feat: market nextlevel --- src/shattered_sword/Scenes/Market.ts | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/shattered_sword/Scenes/Market.ts b/src/shattered_sword/Scenes/Market.ts index c8c9325..d0efc33 100644 --- a/src/shattered_sword/Scenes/Market.ts +++ b/src/shattered_sword/Scenes/Market.ts @@ -29,4 +29,36 @@ export default class Market 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