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

@@ -24,7 +24,7 @@ public partial class App : Node, IApp
[Node] private MainMenu MainMenu { get; set; } = default!;
[Node] private Control LoadingScreen { get; set; } = default!;
[Node] private LoadingScreen LoadingScreen { get; set; } = default!;
public IInstantiator Instantiator { get; set; } = default!;
@@ -118,6 +118,7 @@ public partial class App : Node, IApp
if (_loadingGame)
{
ResourceLoader.LoadThreadedGetStatus(GAME_SCENE_PATH, _progress);
LoadingScreen.ProgressBar.Value = (double)_progress.Single();
if ((double)_progress.Single() == 1)
_loadedScene.OnNext(GAME_SCENE_PATH);
}
@@ -125,6 +126,7 @@ public partial class App : Node, IApp
if (_loadingEnemyViewer)
{
ResourceLoader.LoadThreadedGetStatus(ENEMY_VIEWER_PATH, _progress);
LoadingScreen.ProgressBar.Value = (double)_progress.Single();
if ((double)_progress.Single() == 1)
_loadedScene.OnNext(ENEMY_VIEWER_PATH);
}