feat: porcelain_template triggers

This commit is contained in:
Renge 2022-05-07 20:19:22 -04:00
parent e50465b866
commit 52b8f925eb
4 changed files with 41 additions and 5 deletions

View File

@ -47,8 +47,8 @@
"y": 7, "y": 7,
"possibility": 1 "possibility": 1
} }
] ],
"startCheckPoint": [24, 13, 4, 4]
}, },
"exit": { "exit": {
"width": 30, "width": 30,
@ -72,7 +72,8 @@
"width": 4, "width": 4,
"alt_tile": [11, 11] "alt_tile": [11, 11]
} }
] ],
"endCheckPoint": [20, 17, 10, 6]
}, },
"rooms": [ "rooms": [
{ {

View File

@ -24,7 +24,7 @@ import SnakeAI from "../AI/SnakeAI";
import SlimeAI from "../AI/SlimeAI"; import SlimeAI from "../AI/SlimeAI";
import TigerAI from "../AI/TigerAI"; import TigerAI from "../AI/TigerAI";
import ArcherAI from "../AI/ArcherAI"; import ArcherAI from "../AI/ArcherAI";
import AssassinAI from "../AI/AssassinAi"; import AssassinAI from "../AI/AssassinAI";
import BattlerAI from "../AI/BattlerAI"; import BattlerAI from "../AI/BattlerAI";
import InventoryManager from "../GameSystems/InventoryManager"; import InventoryManager from "../GameSystems/InventoryManager";
import Item from "../GameSystems/items/Item"; import Item from "../GameSystems/items/Item";

View File

@ -12,6 +12,7 @@ import AABB from "../../Wolfie2D/DataTypes/Shapes/AABB";
import EnemyAI from "../AI/EnemyAI"; import EnemyAI from "../AI/EnemyAI";
import BattlerAI from "../AI/BattlerAI"; import BattlerAI from "../AI/BattlerAI";
import InputWrapper from "../Tools/InputWrapper"; import InputWrapper from "../Tools/InputWrapper";
import Greatwall from "./Greatwall";
export default class Porcelain extends GameLevel { export default class Porcelain extends GameLevel {
loadScene(): void { loadScene(): void {
@ -33,4 +34,27 @@ export default class Porcelain 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(Greatwall, {}, sceneOptions);
}
protected playStartStory(): void {
if (!this.touchedStartCheckPoint) {
this.touchedStartCheckPoint = true;
this.storyLoader("shattered_sword_assets/jsons/level1story.json");
this.startTimer();
}
}
} }

View File

@ -42,7 +42,18 @@ export default class Tutorial extends GameLevel {
protected goToNextLevel(): void { protected goToNextLevel(): void {
this.viewport.setZoomLevel(1); this.viewport.setZoomLevel(1);
this.sceneManager.changeToScene(Porcelain); let sceneOptions = {
physics: {
groupNames: ["ground", "player", "enemies"],
collisions:
[
[0, 1, 1],
[1, 0, 0],
[1, 0, 0]
]
}
}
this.sceneManager.changeToScene(Porcelain, {}, sceneOptions);
} }
protected playStartStory(): void { protected playStartStory(): void {