Added StartScreen and Scene Transition script
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common;
|
||||
|
||||
public partial class SceneTransition : Node
|
||||
{
|
||||
[Export] private PackedScene _sceneToLoad;
|
||||
[Export] private Node _sceneInstanceParent;
|
||||
[Export] private bool _unloadSelf = true;
|
||||
|
||||
public void LoadScene()
|
||||
{
|
||||
Node sceneInstance = _sceneToLoad.Instantiate();
|
||||
_sceneInstanceParent.AddChild(sceneInstance);
|
||||
|
||||
if (_unloadSelf)
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cssdu8viimwm6
|
||||
Reference in New Issue
Block a user