Documentation
¶
Overview ¶
Package AnimationNodeStateMachine provides methods for working with AnimationNodeStateMachine object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AddNode(name string, node [1]gdclass.AnimationNode)
- func (self Instance) AddTransition(from string, to string, ...)
- func (self Instance) AllowTransitionToSelf() bool
- func (self Instance) AsAnimationNode() AnimationNode.Instance
- func (self Instance) AsAnimationNodeStateMachine() Instance
- func (self Instance) AsAnimationRootNode() AnimationRootNode.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) GetGraphOffset() Vector2.XY
- func (self Instance) GetNode(name string) [1]gdclass.AnimationNode
- func (self Instance) GetNodeName(node [1]gdclass.AnimationNode) string
- func (self Instance) GetNodePosition(name string) Vector2.XY
- func (self Instance) GetTransition(idx int) [1]gdclass.AnimationNodeStateMachineTransition
- func (self Instance) GetTransitionCount() int
- func (self Instance) GetTransitionFrom(idx int) string
- func (self Instance) GetTransitionTo(idx int) string
- func (self Instance) HasNode(name string) bool
- func (self Instance) HasTransition(from string, to string) bool
- func (self Instance) RemoveNode(name string)
- func (self Instance) RemoveTransition(from string, to string)
- func (self Instance) RemoveTransitionByIndex(idx int)
- func (self Instance) RenameNode(name string, new_name string)
- func (self Instance) ReplaceNode(name string, node [1]gdclass.AnimationNode)
- func (self Instance) ResetEnds() bool
- func (self Instance) SetAllowTransitionToSelf(value bool)
- func (self Instance) SetGraphOffset(offset Vector2.XY)
- func (self Instance) SetNodePosition(name string, position Vector2.XY)
- func (self Instance) SetResetEnds(value bool)
- func (self Instance) SetStateMachineType(value gdclass.AnimationNodeStateMachineStateMachineType)
- func (self Instance) StateMachineType() gdclass.AnimationNodeStateMachineStateMachineType
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type StateMachineType
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.AnimationNodeStateMachine
Contains multiple [AnimationRootNode]s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically. [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) AddNode ¶
func (self Instance) AddNode(name string, node [1]gdclass.AnimationNode)
Adds a new animation node to the graph. The [param position] is used for display in the editor.
func (Instance) AddTransition ¶
func (self Instance) AddTransition(from string, to string, transition [1]gdclass.AnimationNodeStateMachineTransition)
Adds a transition between the given animation nodes.
func (Instance) AllowTransitionToSelf ¶
func (Instance) AsAnimationNode ¶
func (self Instance) AsAnimationNode() AnimationNode.Instance
func (Instance) AsAnimationNodeStateMachine ¶
func (Instance) AsAnimationRootNode ¶
func (self Instance) AsAnimationRootNode() AnimationRootNode.Instance
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) GetGraphOffset ¶
Returns the draw offset of the graph. Used for display in the editor.
func (Instance) GetNode ¶
func (self Instance) GetNode(name string) [1]gdclass.AnimationNode
Returns the animation node with the given name.
func (Instance) GetNodeName ¶
func (self Instance) GetNodeName(node [1]gdclass.AnimationNode) string
Returns the given animation node's name.
func (Instance) GetNodePosition ¶
Returns the given animation node's coordinates. Used for display in the editor.
func (Instance) GetTransition ¶
func (self Instance) GetTransition(idx int) [1]gdclass.AnimationNodeStateMachineTransition
Returns the given transition.
func (Instance) GetTransitionCount ¶
Returns the number of connections in the graph.
func (Instance) GetTransitionFrom ¶
Returns the given transition's start node.
func (Instance) GetTransitionTo ¶
Returns the given transition's end node.
func (Instance) HasTransition ¶
Returns [code]true[/code] if there is a transition between the given animation nodes.
func (Instance) RemoveNode ¶
Deletes the given animation node from the graph.
func (Instance) RemoveTransition ¶
Deletes the transition between the two specified animation nodes.
func (Instance) RemoveTransitionByIndex ¶
Deletes the given transition by index.
func (Instance) RenameNode ¶
Renames the given animation node.
func (Instance) ReplaceNode ¶
func (self Instance) ReplaceNode(name string, node [1]gdclass.AnimationNode)
Replaces the given animation node with a new animation node.
func (Instance) SetAllowTransitionToSelf ¶
func (Instance) SetGraphOffset ¶
Sets the draw offset of the graph. Used for display in the editor.
func (Instance) SetNodePosition ¶
Sets the animation node's coordinates. Used for display in the editor.
func (Instance) SetResetEnds ¶
func (Instance) SetStateMachineType ¶
func (self Instance) SetStateMachineType(value gdclass.AnimationNodeStateMachineStateMachineType)
func (Instance) StateMachineType ¶
func (self Instance) StateMachineType() gdclass.AnimationNodeStateMachineStateMachineType
func (*Instance) UnsafePointer ¶
type StateMachineType ¶
type StateMachineType = gdclass.AnimationNodeStateMachineStateMachineType //gd:AnimationNodeStateMachine.StateMachineType
const ( /*Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine.*/ StateMachineTypeRoot StateMachineType = 0 /*Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine.*/ StateMachineTypeNested StateMachineType = 1 /*This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with [member state_machine_type] of [constant STATE_MACHINE_TYPE_ROOT] or [constant STATE_MACHINE_TYPE_NESTED] in the parent or ancestor.*/ StateMachineTypeGrouped StateMachineType = 2 )