Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
StateMachineType
AnimationNodeStateMachine.swift:22enum StateMachineType
Cases
case root
Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine.
case nested
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.
case grouped
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
stateMachineType
of .root or .nested in the parent or ancestor.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (23) members.
Type members
Instance members
var allowTransitionToSelf: Bool
If
true
, allows teleport to the self state withtravel(toNode:resetOnTeleport:)
. When the reset option is enabled intravel(toNode:resetOnTeleport:)
, the animation is restarted. Iffalse
, nothing happens on the teleportation to the self state.var resetEnds: Bool
If
true
, treat the cross-fade to the start and end nodes as a blend with the RESET animation.var stateMachineType: AnimationNodeStateMachine.StateMachineType
This property can define the process of transitions for different use cases. See also
AnimationNodeStateMachine.StateMachineType
.func addNode(name: StringName, node: AnimationNode?, position: Vector2
) Adds a new animation node to the graph. The
position
is used for display in the editor.func addTransition(from: StringName, to: StringName, transition: AnimationNodeStateMachineTransition?
) Adds a transition between the given animation nodes.
func getGraphOffset(
) -> Vector2 Returns the draw offset of the graph. Used for display in the editor.
func getNode(name: StringName
) -> AnimationNode? Returns the animation node with the given name.
func getNodeName(node: AnimationNode?
) -> StringName Returns the given animation node’s name.
func getNodePosition(name: StringName
) -> Vector2 Returns the given animation node’s coordinates. Used for display in the editor.
func getTransition(idx: Int32
) -> AnimationNodeStateMachineTransition? Returns the given transition.
func getTransitionCount(
) -> Int32 Returns the number of connections in the graph.
func getTransitionFrom(idx: Int32
) -> StringName Returns the given transition’s start node.
func getTransitionTo(idx: Int32
) -> StringName Returns the given transition’s end node.
func hasNode(name: StringName
) -> Bool Returns
true
if the graph contains the given animation node.func hasTransition(from: StringName, to: StringName
) -> Bool Returns
true
if there is a transition between the given animation nodes.func removeNode(name: StringName
) Deletes the given animation node from the graph.
func removeTransition(from: StringName, to: StringName
) Deletes the transition between the two specified animation nodes.
func removeTransitionByIndex(idx: Int32
) Deletes the given transition by index.
func renameNode(name: StringName, newName: StringName
) Renames the given animation node.
func replaceNode(name: StringName, node: AnimationNode?
) Replaces the given animation node with a new animation node.
func setGraphOffset(Vector2
) Sets the draw offset of the graph. Used for display in the editor.
func setNodePosition(name: StringName, position: Vector2
) Sets the animation node’s coordinates. Used for display in the editor.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.