Fix dying loop, add death counter, add die button to debug

This commit is contained in:
2026-01-20 21:18:10 -08:00
parent 670f8baabf
commit a1f67c3d71
16 changed files with 390 additions and 294 deletions

View File

@@ -99,6 +99,7 @@ public partial class Game : Node3D, IGame
},
QuestData = new QuestData()
{
DeathCount = QuestData.DeathCount,
QuestMarker1 = QuestData.QuestMarker1
}
};
@@ -145,6 +146,8 @@ public partial class Game : Node3D, IGame
public async void OnResolved()
{
LoadExistingGame();
await InitializeGame();
GameState.Set(GameRepo);
@@ -256,8 +259,10 @@ public partial class Game : Node3D, IGame
public IDungeonFloor CurrentFloor => _map.CurrentFloor;
public void GameOver()
public async void GameOver()
{
QuestData.DeathCount++;
await Save();
_player.Deactivate();
GameState.Input(new GameState.Input.GameOver());
}
@@ -363,8 +368,8 @@ public partial class Game : Node3D, IGame
})
.Handle((in GameState.Output.GameOver _) =>
{
//GameRepo.Pause();
//DeathMenu.FadeIn();
GameRepo.Pause();
GameOverMenu.FadeIn();
});
}