Class Node_GD_CB_Extension
- Namespace
- Godot
- Assembly
- com.cobilas.godot.utility.dll
Extension for Godot.Node class.
public static class Node_GD_CB_Extension
- Inheritance
-
Node_GD_CB_Extension
- Inherited Members
Methods
ContainsNode(Node, Node)
Allows you to check whether a given Godot.Node object is a child.
public static bool ContainsNode(this Node origin, Node node)
Parameters
origin
NodeThe target object.
node
NodeThe Godot.Node to be compared.
Returns
- bool
Returns
true
when the target object contains the comparison object.
Duplicate<T>(Node, int)
Duplicates the node, returning a new node.
You can fine-tune the behavior using the flags
(see Godot.Node.DuplicateFlags).
Note: It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to method). In that case, the node will be duplicated without a script.
public static T Duplicate<T>(this Node node, int flags = 15) where T : Node
Parameters
node
Nodeflags
int
Returns
- T
Type Parameters
T
FindNodeByName(Node, string)
Get a node from name.
By default, the method looks for a node of type node.(Type typeNode = typeof(Godot.Node))
By default, the method searches recursively.(bool recusive = true)
public static Node FindNodeByName(this Node N, string name)
Parameters
N
NodeThe Godot.Node that will be used.
name
stringThe node name
Returns
- Node
FindNodeByName(Node, string, bool)
Get a node from name.
By default, the method looks for a node of type node.(Type typeNode = typeof(Godot.Node))
public static Node FindNodeByName(this Node N, string name, bool recusive)
Parameters
N
NodeThe Godot.Node that will be used.
name
stringThe node name
recusive
boolAlso look for your children.
Returns
- Node
FindNodeByName(Node, string, Type, bool)
Get a node from name.
public static Node FindNodeByName(this Node N, string name, Type typeNode, bool recusive)
Parameters
N
NodeThe Godot.Node that will be used.
name
stringThe node name
typeNode
TypeThe type to look for.
recusive
boolAlso look for your children.
Returns
- Node
The method returns the object based on its name, if not found the method returns NullNode.
FindNodeByName<T>(Node, string)
Get a node from name.
By default, the method searches recursively.(bool recusive = true)
public static T FindNodeByName<T>(this Node N, string name) where T : Node
Parameters
N
NodeThe Godot.Node that will be used.
name
stringThe node name
Returns
- T
Type Parameters
T
FindNodeByName<T>(Node, string, bool)
Get a node from name.
public static T FindNodeByName<T>(this Node N, string name, bool recusive) where T : Node
Parameters
N
NodeThe Godot.Node that will be used.
name
stringThe node name
recusive
boolAlso look for your children.
Returns
- T
Type Parameters
T
The type to look for.
FindNodes(Node, Type)
Get the nodes from a type.
By default, the method searches recursively.(bool recusive = true)
public static Node[] FindNodes(this Node N, Type typeNode)
Parameters
N
NodeThe Godot.Node that will be used.
typeNode
TypeThe type to look for.
Returns
- Node[]
Returns a list of nodes.
FindNodes(Node, Type, bool)
Get the nodes from a type.
public static Node[] FindNodes(this Node N, Type typeNode, bool recusive)
Parameters
N
NodeThe Godot.Node that will be used.
typeNode
TypeThe type to look for.
recusive
boolAlso look for your children.
Returns
- Node[]
Returns a list of nodes.
FindNodes<T>(Node)
Get the nodes from a type.
By default, the method searches recursively.(bool recusive = true)
public static T[] FindNodes<T>(this Node N) where T : Node
Parameters
N
Node
Returns
- T[]
Returns a list of nodes.
Type Parameters
T
The type to look for.
FindNodes<T>(Node, bool)
Get the nodes from a type.
public static T[] FindNodes<T>(this Node N, bool recusive) where T : Node
Parameters
N
NodeThe Godot.Node that will be used.
recusive
boolAlso look for your children.
Returns
- T[]
Returns a list of nodes.
Type Parameters
T
The type to look for.
GetNodePosition(Node)
Obtem a posição atual do objeto Godot.Node.
This method will only take effect when the Godot.Node object inherits the Godot.Node2D class or the Godot.Spatial class.
public static Vector3D GetNodePosition(this Node N)
Parameters
N
NodeThe Godot.Node that will be used.
Returns
GetNodeRotation(Node)
Gets the current rotation of the Godot.Node object.
This method will only take effect when the Godot.Node object inherits the Godot.Node2D class or the Godot.Spatial class.
public static Vector3D GetNodeRotation(this Node N)
Parameters
N
NodeThe Godot.Node that will be used.
Returns
GetNodeScale(Node)
Gets the current scale of the Godot.Node object.
This method will only take effect when the Godot.Node object inherits the Godot.Node2D class or the Godot.Spatial class.
public static Vector3D GetNodeScale(this Node N)
Parameters
N
NodeThe Godot.Node that will be used.
Returns
- Vector3D
Returns a Vector3D containing the current scale of the Node object.
SetNodePosition(Node, Vector3D)
Allows you to define the position of the Godot.Node object.
This method will only take effect when the Godot.Node object inherits the Godot.Node2D class or the Godot.Spatial class.
public static void SetNodePosition(this Node N, Vector3D position)
Parameters
N
NodeThe Godot.Node that will be used.
position
Vector3DThe new position of the Godot.Node object.
SetNodeRotation(Node, Vector3D)
Allows you to define the rotation of the Godot.Node object.
This method will only take effect when the Godot.Node object inherits the Godot.Node2D class or the Godot.Spatial class.
public static void SetNodeRotation(this Node N, Vector3D rotation)
Parameters
N
NodeThe Godot.Node that will be used.
rotation
Vector3DThe new rotation of the Godot.Node object.
SetNodeScale(Node, Vector3D)
Allows you to define the scale of the Godot.Node object.
This method will only take effect when the Godot.Node object inherits the Godot.Node2D class or the Godot.Spatial class.
public static void SetNodeScale(this Node N, Vector3D scale)
Parameters
N
NodeThe Godot.Node that will be used.
scale
Vector3DThe new size or scale of the Godot.Node object.