Added indoor ending
This commit is contained in:
@@ -5,13 +5,18 @@ namespace Babushka.scripts.CSharp.Common;
|
||||
public partial class SceneTransition : Node
|
||||
{
|
||||
[Export] private PackedScene _sceneToLoad;
|
||||
[Export] private Node _sceneInstanceParent;
|
||||
[Export] private Node? _sceneInstanceParent;
|
||||
[Export] private bool _unloadSelf = true;
|
||||
|
||||
public void LoadScene()
|
||||
{
|
||||
Node sceneInstance = _sceneToLoad.Instantiate();
|
||||
_sceneInstanceParent.AddChild(sceneInstance);
|
||||
if(_sceneInstanceParent != null)
|
||||
_sceneInstanceParent.AddChild(sceneInstance);
|
||||
else
|
||||
{
|
||||
GetTree().Root.AddChild(sceneInstance);
|
||||
}
|
||||
|
||||
if (_unloadSelf)
|
||||
{
|
||||
@@ -19,4 +24,9 @@ public partial class SceneTransition : Node
|
||||
}
|
||||
}
|
||||
|
||||
public void Quit()
|
||||
{
|
||||
GetTree().Quit();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user