19 lines
364 B
C#
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;
|
|
}
|
|
|
|
|
|
|
|
} |