31 lines
435 B
C#
31 lines
435 B
C#
|
using Godot;
|
||
|
|
||
|
|
||
|
namespace Rokojori
|
||
|
{
|
||
|
public partial class Root:Node
|
||
|
{
|
||
|
private static Root _singleton;
|
||
|
|
||
|
public override void _Ready()
|
||
|
{
|
||
|
_singleton = this;
|
||
|
}
|
||
|
|
||
|
public static SceneTree Tree()
|
||
|
{
|
||
|
return _singleton.GetTree();
|
||
|
}
|
||
|
|
||
|
public static Window Window()
|
||
|
{
|
||
|
return Tree().Root;
|
||
|
}
|
||
|
|
||
|
public static Root Get()
|
||
|
{
|
||
|
var r = Window();
|
||
|
return _singleton;
|
||
|
}
|
||
|
}
|
||
|
}
|