Documentation ¶
Overview ¶
Package AnimationNodeStateMachinePlayback provides methods for working with AnimationNodeStateMachinePlayback object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsAnimationNodeStateMachinePlayback() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) GetCurrentLength() Float.X
- func (self Instance) GetCurrentNode() string
- func (self Instance) GetCurrentPlayPosition() Float.X
- func (self Instance) GetFadingFromNode() string
- func (self Instance) GetTravelPath() []string
- func (self Instance) IsPlaying() bool
- func (self Instance) Next()
- func (self Instance) Start(node string)
- func (self Instance) Stop()
- func (self Instance) Travel(to_node string)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
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 Instance ¶
type Instance [1]gdclass.AnimationNodeStateMachinePlayback
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 (Instance) AsAnimationNodeStateMachinePlayback ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) GetCurrentLength ¶
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 ¶
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 ¶
Returns the playback position within the current animation state.
func (Instance) GetFadingFromNode ¶
Returns the starting state of currently fading animation.
func (Instance) GetTravelPath ¶
Returns the current travel path as computed internally by the A* algorithm.
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 ¶
Starts playing the given animation. If [param reset] is [code]true[/code], the animation is played from the beginning.
func (Instance) Travel ¶
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.