[][src]Struct gdnative::api::AnimationNodeStateMachine

pub struct AnimationNodeStateMachine { /* fields omitted */ }

core class AnimationNodeStateMachine inherits AnimationRootNode (reference counted).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

Memory management

The lifetime of this object is automatically managed through reference counting.

Class hierarchy

AnimationNodeStateMachine inherits methods from:

Safety

All types in the Godot API have "interior mutability" in Rust parlance. To enforce that the official thread-safety guidelines are followed, the typestate pattern is used in the Ref and TRef smart pointers, and the Instance API. The typestate Access in these types tracks whether the access is unique, shared, or exclusive to the current thread. For more information, see the type-level documentation on Ref.

Implementations

impl AnimationNodeStateMachine[src]

pub fn new() -> Ref<AnimationNodeStateMachine, Unique>[src]

Creates a new instance of this object.

This is a reference-counted type. The returned object is automatically managed by Ref.

pub fn add_node(
    &self,
    name: impl Into<GodotString>,
    node: impl AsArg<AnimationNode>,
    position: Vector2D<f32, UnknownUnit>
)
[src]

Adds a new node to the graph. The [code]position[/code] is used for display in the editor.

Default Arguments

  • position - Vector2( 0, 0 )

pub fn add_transition(
    &self,
    from: impl Into<GodotString>,
    to: impl Into<GodotString>,
    transition: impl AsArg<AnimationNodeStateMachineTransition>
)
[src]

Adds a transition between the given nodes.

pub fn get_end_node(&self) -> GodotString[src]

Returns the graph's end node.

pub fn get_graph_offset(&self) -> Vector2D<f32, UnknownUnit>[src]

Returns the draw offset of the graph. Used for display in the editor.

pub fn get_node(
    &self,
    name: impl Into<GodotString>
) -> Option<Ref<AnimationNode, Shared>>
[src]

Returns the animation node with the given name.

pub fn get_node_name(&self, node: impl AsArg<AnimationNode>) -> GodotString[src]

Returns the given animation node's name.

pub fn get_node_position(
    &self,
    name: impl Into<GodotString>
) -> Vector2D<f32, UnknownUnit>
[src]

Returns the given node's coordinates. Used for display in the editor.

pub fn get_start_node(&self) -> GodotString[src]

Returns the graph's end node.

pub fn get_transition(
    &self,
    idx: i64
) -> Option<Ref<AnimationNodeStateMachineTransition, Shared>>
[src]

Returns the given transition.

pub fn get_transition_count(&self) -> i64[src]

Returns the number of connections in the graph.

pub fn get_transition_from(&self, idx: i64) -> GodotString[src]

Returns the given transition's start node.

pub fn get_transition_to(&self, idx: i64) -> GodotString[src]

Returns the given transition's end node.

pub fn has_node(&self, name: impl Into<GodotString>) -> bool[src]

Returns [code]true[/code] if the graph contains the given node.

pub fn has_transition(
    &self,
    from: impl Into<GodotString>,
    to: impl Into<GodotString>
) -> bool
[src]

Returns [code]true[/code] if there is a transition between the given nodes.

pub fn remove_node(&self, name: impl Into<GodotString>)[src]

Deletes the given node from the graph.

pub fn remove_transition(
    &self,
    from: impl Into<GodotString>,
    to: impl Into<GodotString>
)
[src]

Deletes the transition between the two specified nodes.

pub fn remove_transition_by_index(&self, idx: i64)[src]

Deletes the given transition by index.

pub fn rename_node(
    &self,
    name: impl Into<GodotString>,
    new_name: impl Into<GodotString>
)
[src]

Renames the given node.

pub fn replace_node(
    &self,
    name: impl Into<GodotString>,
    node: impl AsArg<AnimationNode>
)
[src]

Replaces the node and keeps its transitions unchanged.

pub fn set_end_node(&self, name: impl Into<GodotString>)[src]

Sets the given node as the graph end point.

pub fn set_graph_offset(&self, offset: Vector2D<f32, UnknownUnit>)[src]

Sets the draw offset of the graph. Used for display in the editor.

pub fn set_node_position(
    &self,
    name: impl Into<GodotString>,
    position: Vector2D<f32, UnknownUnit>
)
[src]

Sets the node's coordinates. Used for display in the editor.

pub fn set_start_node(&self, name: impl Into<GodotString>)[src]

Sets the given node as the graph start point.

Methods from Deref<Target = AnimationRootNode>

Trait Implementations

impl Debug for AnimationNodeStateMachine[src]

impl Deref for AnimationNodeStateMachine[src]

type Target = AnimationRootNode

The resulting type after dereferencing.

impl DerefMut for AnimationNodeStateMachine[src]

impl GodotObject for AnimationNodeStateMachine[src]

type RefKind = RefCounted

The memory management kind of this type. This modifies the behavior of the Ref smart pointer. See its type-level documentation for more information. Read more

impl Instanciable for AnimationNodeStateMachine[src]

impl SubClass<AnimationNode> for AnimationNodeStateMachine[src]

impl SubClass<AnimationRootNode> for AnimationNodeStateMachine[src]

impl SubClass<Object> for AnimationNodeStateMachine[src]

impl SubClass<Reference> for AnimationNodeStateMachine[src]

impl SubClass<Resource> for AnimationNodeStateMachine[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.