Rework loading maps to be asynchronous, change debug menu so that its not completely pausing the game

This commit is contained in:
2025-09-26 14:05:05 -07:00
parent 578cde65cc
commit 9107b8c570
10 changed files with 164 additions and 95 deletions

View File

@@ -177,13 +177,13 @@ public partial class Game : Node3D, IGame
{
InGameUI.DebugMenu.Show();
InGameUI.PlayerInfoUI.Hide();
GameRepo.Pause();
_player.Deactivate();
})
.Handle((in GameState.Output.CloseDebugMenu _) =>
{
InGameUI.DebugMenu.Hide();
InGameUI.PlayerInfoUI.Show();
GameRepo.Resume();
_player.Activate();
})
.Handle((in GameState.Output.OpenTeleportScreen _) =>
{
@@ -199,7 +199,7 @@ public partial class Game : Node3D, IGame
.Handle((in GameState.Output.LoadNextFloor _) =>
{
FloorClearMenu.FadeOut();
_map.SpawnNextFloor();
_map.LoadFloor();
if (_player.EquippedWeapon.Value.ItemTag == ItemTag.BreaksOnChange)
{
var itemToDestroy = _player.EquippedWeapon.Value;
@@ -247,7 +247,7 @@ public partial class Game : Node3D, IGame
public void OnReady()
{
InitializeGame();
_map.LoadMap();
_map.LoadFloor();
GameRepo.Resume();
InGameUI.Show();
InGameUI.PlayerInfoUI.Activate();