Add debug foundation
This commit is contained in:
@@ -15,6 +15,9 @@ public partial class GameRoot : Node
|
||||
GD.Print($"Debug boot: {m_Settings.BootMode}");
|
||||
GD.Print($"Seed: {m_Settings.Seed}");
|
||||
|
||||
m_CommandNode = GetNodeOrNull<DebugCommandNode>("DebugCommandNode");
|
||||
m_CommandNode?.Initialize(m_Settings);
|
||||
|
||||
LoadBootScene(m_Settings.BootMode);
|
||||
}
|
||||
|
||||
@@ -24,6 +27,7 @@ public partial class GameRoot : Node
|
||||
{
|
||||
DebugBootMode.Smoke => SmokeScene,
|
||||
DebugBootMode.ContentBrowser => ContentBrowserScene,
|
||||
DebugBootMode.DebugSandbox => DebugSandboxScene,
|
||||
_ => MenuScene
|
||||
};
|
||||
|
||||
@@ -45,7 +49,14 @@ public partial class GameRoot : Node
|
||||
DebugOverlay? overlay = GetNodeOrNull<DebugOverlay>("DebugOverlay");
|
||||
if (overlay is not null && m_Settings is not null)
|
||||
{
|
||||
overlay.SetStatus(m_Settings, loadedSceneId);
|
||||
if (m_CommandNode is not null)
|
||||
{
|
||||
overlay.Bind(m_CommandNode.Service, m_Settings, loadedSceneId);
|
||||
}
|
||||
else
|
||||
{
|
||||
overlay.SetStatus(m_Settings, loadedSceneId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +69,10 @@ public partial class GameRoot : Node
|
||||
[Export]
|
||||
public PackedScene? ContentBrowserScene { get; set; }
|
||||
|
||||
[Export]
|
||||
public PackedScene? DebugSandboxScene { get; set; }
|
||||
|
||||
private Node? m_LoadedScene;
|
||||
private DebugSettings? m_Settings;
|
||||
private DebugCommandNode? m_CommandNode;
|
||||
}
|
||||
Reference in New Issue
Block a user