feat: snow next level

This commit is contained in:
Renge 2022-05-09 11:12:10 -04:00
parent 4ef7e771ee
commit 8be83aee6a
2 changed files with 36 additions and 1 deletions

View File

@ -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 {

View File

@ -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;
}
}
}