feat: market nextlevel

This commit is contained in:
Renge 2022-05-09 11:21:54 -04:00
parent b61beeda40
commit c62be62353

View File

@ -29,4 +29,36 @@ export default class Market extends GameLevel {
//load music here //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;
}
}
} }