add: Template for Save and config

This commit is contained in:
h z
2025-02-07 02:29:37 +00:00
parent 1f2ba38f65
commit 15c667c3c4
13 changed files with 168 additions and 15 deletions

View File

@@ -1,19 +1,21 @@
using Godot;
namespace Polonium.Scenes;
public abstract partial class RootScene : Node2D
[GlobalClass]
public partial class RootScene : Node2D
{
private Polonium.Scenes.Scene CurrentScene { get; set; }
private Scene CurrentScene { get; set; }
public void SwitchScene(Polonium.Scenes.Scene scene)
public void SwitchScene(Scene scene)
{
if (CurrentScene != null)
RemoveChild(CurrentScene);
AddChild(scene);
CurrentScene = scene;
}
public override void _Ready()
{
PoloniumRegistry.Instance.RootScene = this;
base._Ready();
}
}