Files
Polonium/src/Scenes/RootScene.cs
2025-02-06 01:30:53 +00:00

19 lines
364 B
C#

using Godot;
namespace Polonium.Scenes;
public abstract partial class RootScene : Node2D
{
private Polonium.Scenes.Scene CurrentScene { get; set; }
public void SwitchScene(Polonium.Scenes.Scene scene)
{
if (CurrentScene != null)
RemoveChild(CurrentScene);
AddChild(scene);
CurrentScene = scene;
}
}