feat: initial import
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using Godot;
|
||||
|
||||
namespace GodotHostTest;
|
||||
|
||||
public partial class PrintOrder : Node
|
||||
{
|
||||
[Export] private Node? _otherNode;
|
||||
|
||||
public PrintOrder()
|
||||
{
|
||||
PrintStatus("constructor");
|
||||
}
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
PrintStatus("_enter_tree");
|
||||
}
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
PrintStatus("_ready");
|
||||
}
|
||||
|
||||
private void PrintStatus(string moment)
|
||||
{
|
||||
var hasExport = _otherNode != null;
|
||||
var hasParent = GetParent() != null;
|
||||
var numChildren = GetChildren().Count - 1; // remove the non-script child
|
||||
GD.Print($"[{moment,11}] Child {Name,-8} Has export? {hasExport} Has parent? {hasParent} Script children? {numChildren}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user