feat: snow next level
This commit is contained in:
parent
4ef7e771ee
commit
8be83aee6a
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user