|
|
|
|
@ -11,6 +11,7 @@ public partial class FightSceneSwitcher : Node
|
|
|
|
|
[Export] private Node _sceneRoot = null!;
|
|
|
|
|
[Export] private string _fightRoomScenePath = null!;
|
|
|
|
|
[Export] private string _fightHappeningScene = null!;
|
|
|
|
|
[Export] private string _nightEndScene = null!;
|
|
|
|
|
|
|
|
|
|
private void LoadNext()
|
|
|
|
|
{
|
|
|
|
|
@ -36,6 +37,12 @@ public partial class FightSceneSwitcher : Node
|
|
|
|
|
if (!FightWorld.Instance.currentRoom.paths.TryGetValue(pathIndex, out var nextRoom))
|
|
|
|
|
throw new Exception("Trying to go down a non-existent path");
|
|
|
|
|
|
|
|
|
|
if (nextRoom.specialRoom == FightWorld.Room.Special.EndOfNight)
|
|
|
|
|
{
|
|
|
|
|
ExitFightWorld();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FightWorld.Instance.currentRoom = nextRoom;
|
|
|
|
|
LoadNext();
|
|
|
|
|
}
|
|
|
|
|
@ -60,4 +67,10 @@ public partial class FightSceneSwitcher : Node
|
|
|
|
|
FightWorld.Instance.fightHappeningData = null;
|
|
|
|
|
LoadNext();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ExitFightWorld()
|
|
|
|
|
{
|
|
|
|
|
SceneTransitionThreaded.Instance.ChangeSceneToFile(_nightEndScene);
|
|
|
|
|
_ = UnloadAfterDelay();
|
|
|
|
|
}
|
|
|
|
|
}
|