AnimationNodeStateMachinePlayback

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package AnimationNodeStateMachinePlayback provides methods for working with AnimationNodeStateMachinePlayback object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsAnimationNodeStateMachinePlayback() Instance
}

type Instance

Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. [b]Example:[/b] [codeblocks] [gdscript] var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") [/gdscript] [csharp] var stateMachine = GetNode<AnimationTree>("AnimationTree").Get("parameters/playback").As<AnimationNodeStateMachinePlayback>(); stateMachine.Travel("some_state"); [/csharp] [/codeblocks]

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsAnimationNodeStateMachinePlayback

func (self Instance) AsAnimationNodeStateMachinePlayback() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) GetCurrentLength

func (self Instance) GetCurrentLength() Float.X

Returns the current state length. [b]Note:[/b] It is possible that any [AnimationRootNode] can be nodes as well as animations. This means that there can be multiple animations within a single state. Which animation length has priority depends on the nodes connected inside it. Also, if a transition does not reset, the remaining length at that point will be returned.

func (Instance) GetCurrentNode

func (self Instance) GetCurrentNode() string

Returns the currently playing animation state. [b]Note:[/b] When using a cross-fade, the current state changes to the next state immediately after the cross-fade begins.

func (Instance) GetCurrentPlayPosition

func (self Instance) GetCurrentPlayPosition() Float.X

Returns the playback position within the current animation state.

func (Instance) GetFadingFromNode

func (self Instance) GetFadingFromNode() string

Returns the starting state of currently fading animation.

func (Instance) GetTravelPath

func (self Instance) GetTravelPath() []string

Returns the current travel path as computed internally by the A* algorithm.

func (Instance) IsPlaying

func (self Instance) IsPlaying() bool

Returns [code]true[/code] if an animation is playing.

func (Instance) Next

func (self Instance) Next()

If there is a next path by travel or auto advance, immediately transitions from the current state to the next state.

func (Instance) Start

func (self Instance) Start(node string)

Starts playing the given animation. If [param reset] is [code]true[/code], the animation is played from the beginning.

func (Instance) Stop

func (self Instance) Stop()

Stops the currently playing animation.

func (Instance) Travel

func (self Instance) Travel(to_node string)

Transitions from the current state to another one, following the shortest path. If the path does not connect from the current state, the animation will play after the state teleports. If [param reset_on_teleport] is [code]true[/code], the animation is played from the beginning when the travel cause a teleportation.

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL