Documentation
¶
Overview ¶
The path generated when using AnimationNodeStateMachinePlayback.Travel is limited to the nodes connected by AnimationNodeStateMachineTransition.
You can set the timing and conditions of the transition in detail.
Index ¶
- type AdvanceMode
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AdvanceCondition() string
- func (self Instance) AdvanceExpression() string
- func (self Instance) AdvanceMode() AdvanceMode
- func (self Instance) AsAnimationNodeStateMachineTransition() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) BreakLoopAtEnd() bool
- func (self Instance) ID() ID
- func (self Instance) OnAdvanceConditionChanged(cb func(), flags ...Signal.Flags)
- func (self Instance) Priority() int
- func (self Instance) Reset() bool
- func (self Instance) SetAdvanceCondition(value string)
- func (self Instance) SetAdvanceExpression(value string)
- func (self Instance) SetAdvanceMode(value AdvanceMode)
- func (self Instance) SetBreakLoopAtEnd(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetPriority(value int)
- func (self Instance) SetReset(value bool)
- func (self Instance) SetSwitchMode(value SwitchMode)
- func (self Instance) SetXfadeCurve(value Curve.Instance)
- func (self Instance) SetXfadeTime(value Float.X)
- func (self Instance) SwitchMode() SwitchMode
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) XfadeCurve() Curve.Instance
- func (self Instance) XfadeTime() Float.X
- type SwitchMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvanceMode ¶
type AdvanceMode int //gd:AnimationNodeStateMachineTransition.AdvanceMode
const ( // Don't use this transition. AdvanceModeDisabled AdvanceMode = 0 // Only use this transition during [AnimationNodeStateMachinePlayback.Travel]. // // [AnimationNodeStateMachinePlayback.Travel]: https://pkg.go.dev/graphics.gd/classdb/AnimationNodeStateMachinePlayback#Instance.Travel AdvanceModeEnabled AdvanceMode = 1 // Automatically use this transition if the [AdvanceCondition] and [AdvanceExpression] checks are true (if assigned). // // [AdvanceCondition]: https://pkg.go.dev/graphics.gd/classdb/#Instance.AdvanceCondition // [AdvanceExpression]: https://pkg.go.dev/graphics.gd/classdb/#Instance.AdvanceExpression AdvanceModeAuto AdvanceMode = 2 )
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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsAnimationNodeStateMachineTransition ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.AnimationNodeStateMachineTransition
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AdvanceCondition ¶
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the AnimationTree that can be controlled from code (see Using AnimationTree). For example, if AnimationTree.TreeRoot is an AnimationNodeStateMachine and AdvanceCondition is set to "idle":
func (Instance) AdvanceExpression ¶
Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code.
func (Instance) AdvanceMode ¶
func (self Instance) AdvanceMode() AdvanceMode
Determines whether the transition should be disabled, enabled when using AnimationNodeStateMachinePlayback.Travel, or traversed automatically if the AdvanceCondition and AdvanceExpression checks are true (if assigned).
func (Instance) AsAnimationNodeStateMachineTransition ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) BreakLoopAtEnd ¶
If true, breaks the loop at the end of the loop cycle for transition, even if the animation is looping.
func (Instance) OnAdvanceConditionChanged ¶
Emitted when AdvanceCondition is changed.
func (Instance) Priority ¶
Lower priority transitions are preferred when travelling through the tree via AnimationNodeStateMachinePlayback.Travel or AdvanceMode is set to AdvanceModeAuto.
func (Instance) Reset ¶
If true, the destination animation is played back from the beginning when switched.
func (Instance) SetAdvanceCondition ¶
SetAdvanceCondition sets the property returned by [GetAdvanceCondition].
func (Instance) SetAdvanceExpression ¶
SetAdvanceExpression sets the property returned by [GetAdvanceExpression].
func (Instance) SetAdvanceMode ¶
func (self Instance) SetAdvanceMode(value AdvanceMode)
SetAdvanceMode sets the property returned by [GetAdvanceMode].
func (Instance) SetBreakLoopAtEnd ¶
SetBreakLoopAtEnd sets the property returned by [IsLoopBrokenAtEnd].
func (Instance) SetPriority ¶
SetPriority sets the property returned by [GetPriority].
func (Instance) SetSwitchMode ¶
func (self Instance) SetSwitchMode(value SwitchMode)
SetSwitchMode sets the property returned by [GetSwitchMode].
func (Instance) SetXfadeCurve ¶
SetXfadeCurve sets the property returned by [GetXfadeCurve].
func (Instance) SetXfadeTime ¶
SetXfadeTime sets the property returned by [GetXfadeTime].
func (Instance) XfadeCurve ¶
Ease curve for better control over cross-fade between this state and the next. Should be a unit Curve.
func (Instance) XfadeTime ¶
The time to cross-fade between this state and the next.
Note: AnimationNodeStateMachine transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When AnimationNodeOutput is considered as the most upstream, so the XfadeTime is not scaled depending on the downstream delta. See also AnimationNodeOneShot.FadeoutTime.
type SwitchMode ¶
type SwitchMode int //gd:AnimationNodeStateMachineTransition.SwitchMode
const ( // Switch to the next state immediately. The current state will end and blend into the beginning of the new one. SwitchModeImmediate SwitchMode = 0 // Switch to the next state immediately, but will seek the new state to the playback position of the old state. SwitchModeSync SwitchMode = 1 // Wait for the current state playback to end, then switch to the beginning of the next state animation. SwitchModeAtEnd SwitchMode = 2 )