Table of Contents

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

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 Node

The Godot.Node that will be used.

name string

The 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 Node

The Godot.Node that will be used.

name string

The node name

recusive bool

Also 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 Node

The Godot.Node that will be used.

name string

The node name

typeNode Type

The type to look for.

recusive bool

Also 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 Node

The Godot.Node that will be used.

name string

The 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 Node

The Godot.Node that will be used.

name string

The node name

recusive bool

Also 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 Node

The Godot.Node that will be used.

typeNode Type

The 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 Node

The Godot.Node that will be used.

typeNode Type

The type to look for.

recusive bool

Also 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 Node

The Godot.Node that will be used.

recusive bool

Also 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 Node

The Godot.Node that will be used.

Returns

Vector3D

Returns a Vector3D containing the current position of the Godot.Node object.

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 Node

The Godot.Node that will be used.

Returns

Vector3D

Returns a Vector3D containing the current rotation of the Godot.Node object.

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 Node

The Godot.Node that will be used.

Returns

Vector3D

Returns a Vector3D containing the current scale of the Node object.

Print(Node, params object[])

Converts one or more arguments of any type to string in the best way possible and prints them to the console.

Note: Consider using PushError(string) and PushWarning(string) to print error and warning messages instead of Print(params object[]). This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.

public static void Print(this Node N, params object[] args)

Parameters

N Node

The Godot.Node that will be used.

args object[]

The arguments passed will be printed to the console.

Examples

var a = new int[] { 1, 2, 3 };
GD.Print("a", "b", a); // Prints ab[1, 2, 3]

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 Node

The Godot.Node that will be used.

position Vector3D

The 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 Node

The Godot.Node that will be used.

rotation Vector3D

The 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 Node

The Godot.Node that will be used.

scale Vector3D

The new size or scale of the Godot.Node object.