Set dungeon manager when entering a dungeon

This commit is contained in:
KingRainbow44 2023-04-14 22:44:59 -04:00
parent e93175621b
commit 6b492656a1
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
2 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,6 @@ public final class DungeonManager {
this.dungeonData = dungeonData; this.dungeonData = dungeonData;
this.passConfigData = GameData.getDungeonPassConfigDataMap().get(dungeonData.getPassCond()); this.passConfigData = GameData.getDungeonPassConfigDataMap().get(dungeonData.getPassCond());
this.finishedConditions = new int[passConfigData.getConds().size()]; this.finishedConditions = new int[passConfigData.getConds().size()];
this.scene.setDungeonManager(this);
} }
public void triggerEvent(DungeonPassConditionType conditionType, int... params) { public void triggerEvent(DungeonPassConditionType conditionType, int... params) {

View File

@ -116,6 +116,7 @@ public class DungeonSystem extends BaseGameSystem {
if (player.getWorld().transferPlayerToScene(player, sceneId, data)) { if (player.getWorld().transferPlayerToScene(player, sceneId, data)) {
scene = player.getScene(); scene = player.getScene();
scene.setDungeonManager(new DungeonManager(scene, data));
scene.addDungeonSettleObserver(basicDungeonSettleObserver); scene.addDungeonSettleObserver(basicDungeonSettleObserver);
} }