namespace Godot { public partial class Node { public T GetNode(NodePath path) where T : Godot.Node { return (T)GetNode(path); } public T GetNodeOrNull(NodePath path) where T : Godot.Node { return GetNode(path) as T; } public T GetChild(int idx) where T : Godot.Node { return (T)GetChild(idx); } public T GetChildOrNull(int idx) where T : Godot.Node { return GetChild(idx) as T; } public T GetOwner() where T : Godot.Node { return (T)GetOwner(); } public T GetOwnerOrNull() where T : Godot.Node { return GetOwner() as T; } public T GetParent() where T : Godot.Node { return (T)GetParent(); } public T GetParentOrNull() where T : Godot.Node { return GetParent() as T; } } }