add: Template for Save and config
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user