Exemplo n.º 1
0
 public string GetConcatenatedSubnames()
 {
     return(godot_icall_NodePath_get_concatenated_subnames(NodePath.GetPtr(this)));
 }
Exemplo n.º 2
0
 public string GetName(int idx)
 {
     return(godot_icall_NodePath_get_name(NodePath.GetPtr(this), idx));
 }
Exemplo n.º 3
0
 public bool IsEmpty()
 {
     return(godot_icall_NodePath_is_empty(NodePath.GetPtr(this)));
 }
Exemplo n.º 4
0
 public NodePath GetAsPropertyPath()
 {
     return(new NodePath(godot_icall_NodePath_get_as_property_path(NodePath.GetPtr(this))));
 }
Exemplo n.º 5
0
 public bool IsAbsolute()
 {
     return(godot_icall_NodePath_is_absolute(NodePath.GetPtr(this)));
 }
Exemplo n.º 6
0
 public int GetSubnameCount()
 {
     return(godot_icall_NodePath_get_subname_count(NodePath.GetPtr(this)));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Fetches a node. The <see cref="NodePath"/> can be either a relative path (from
 /// the current node) or an absolute path (in the scene tree) to a node. If the path
 /// does not exist, a <see langword="null"/> instance is returned and an error
 /// is logged. Attempts to access methods on the return value will result in an
 /// "Attempt to call &lt;method&gt; on a null instance." error.
 /// Note: Fetching absolute paths only works when the node is inside the scene tree
 /// (see <see cref="IsInsideTree"/>).
 /// </summary>
 /// <example>
 /// Example: Assume your current node is Character and the following tree:
 /// <code>
 /// /root
 /// /root/Character
 /// /root/Character/Sword
 /// /root/Character/Backpack/Dagger
 /// /root/MyGame
 /// /root/Swamp/Alligator
 /// /root/Swamp/Mosquito
 /// /root/Swamp/Goblin
 /// </code>
 /// Possible paths are:
 /// <code>
 /// GetNode("Sword");
 /// GetNode("Backpack/Dagger");
 /// GetNode("../Swamp/Alligator");
 /// GetNode("/root/MyGame");
 /// </code>
 /// </example>
 /// <seealso cref="GetNode{T}(NodePath)"/>
 /// <param name="path">The path to the node to fetch.</param>
 /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
 /// <returns>
 /// The <see cref="Node"/> at the given <paramref name="path"/>, or <see langword="null"/> if not found.
 /// </returns>
 public T GetNodeOrNull <T>(NodePath path) where T : class
 {
     return(GetNodeOrNull(path) as T);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Fetches a node. The <see cref="NodePath"/> can be either a relative path (from
 /// the current node) or an absolute path (in the scene tree) to a node. If the path
 /// does not exist, a <see langword="null"/> instance is returned and an error
 /// is logged. Attempts to access methods on the return value will result in an
 /// "Attempt to call &lt;method&gt; on a null instance." error.
 /// Note: Fetching absolute paths only works when the node is inside the scene tree
 /// (see <see cref="IsInsideTree"/>).
 /// </summary>
 /// <example>
 /// Example: Assume your current node is Character and the following tree:
 /// <code>
 /// /root
 /// /root/Character
 /// /root/Character/Sword
 /// /root/Character/Backpack/Dagger
 /// /root/MyGame
 /// /root/Swamp/Alligator
 /// /root/Swamp/Mosquito
 /// /root/Swamp/Goblin
 /// </code>
 /// Possible paths are:
 /// <code>
 /// GetNode("Sword");
 /// GetNode("Backpack/Dagger");
 /// GetNode("../Swamp/Alligator");
 /// GetNode("/root/MyGame");
 /// </code>
 /// </example>
 /// <seealso cref="GetNodeOrNull{T}(NodePath)"/>
 /// <param name="path">The path to the node to fetch.</param>
 /// <exception cref="InvalidCastException">
 /// Thrown when the given the fetched node can't be casted to the given type <typeparamref name="T"/>.
 /// </exception>
 /// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Node"/>.</typeparam>
 /// <returns>
 /// The <see cref="Node"/> at the given <paramref name="path"/>.
 /// </returns>
 public T GetNode <T>(NodePath path) where T : class
 {
     return((T)(object)GetNode(path));
 }
Exemplo n.º 9
0
 public Node GetNode(NodePath path)
 {
     throw new NotImplementedException();
 }