Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
AnimationCallbackModeMethod
AnimationMixer.swift:45enum AnimationCallbackModeMethod
Cases
case deferred
Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing.
case immediate
Make method calls immediately when reached in the animation.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (38) members.
Types
enum AnimationCallbackModeProcess
class Signal1
Signal support.
class Signal2
Signal support.
Type members
Instance members
var active: Bool
If
true
, theAnimationMixer
will be processing.var animationFinished: Signal1
Notifies when an animation finished playing.
var animationLibrariesUpdated: SimpleSignal
Notifies when the animation libraries have changed.
var animationListChanged: SimpleSignal
Notifies when an animation list is changed.
var animationStarted: Signal2
Notifies when an animation starts playing.
var audioMaxPolyphony: Int32
The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers.
var cachesCleared: SimpleSignal
Notifies when the caches have been cleared, either automatically, or manually via
clearCaches
.var callbackModeMethod: AnimationMixer.AnimationCallbackModeMethod
The call mode to use for Call Method tracks.
var callbackModeProcess: AnimationMixer.AnimationCallbackModeProcess
The process notification in which to update animations.
var deterministic: Bool
If
true
, the blending uses the deterministic algorithm. The total weight is not normalized and the result is accumulated with an initial value (0
or a"RESET"
animation if present).var mixerUpdated: SimpleSignal
Editor only. Notifies when the property have been updated to update dummy
AnimationPlayer
in animation player editor.var resetOnSave: Bool
This is used by the editor. If set to
true
, the scene will be saved with the effects of the reset animation (the animation with the key"RESET"
) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving.var rootMotionTrack: NodePath
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by
":"
. For example,"character/skeleton:ankle"
or"character/mesh:transform/local"
.var rootNode: NodePath
The node from which node path references will travel.
func addAnimationLibrary(name: StringName, library: AnimationLibrary?
) -> GodotError Adds
library
to the animation player, under the keyname
.func advance(delta: Double
) Manually advance the animations by the specified time (in seconds).
func clearCaches(
) AnimationMixer
caches animated nodes. It may not notice if a node disappears;clearCaches
forces it to update the cache again.func findAnimation(Animation?
) -> StringName Returns the key of
animation
or an emptyStringName
if not found.func findAnimationLibrary(animation: Animation?
) -> StringName Returns the key for the
AnimationLibrary
that containsanimation
or an emptyStringName
if not found.func getAnimation(name: StringName
) -> Animation? Returns the
Animation
with the keyname
. If the animation does not exist,null
is returned and an error is logged.func getAnimationLibrary(name: StringName
) -> AnimationLibrary? Returns the first
AnimationLibrary
with keyname
ornull
if not found.func getAnimationLibraryList(
) -> VariantCollection<StringName> Returns the list of stored library keys.
func getAnimationList(
) -> PackedStringArray Returns the list of stored animation keys.
func getRootMotionPosition(
) -> Vector3 Retrieve the motion delta of position with the
rootMotionTrack
as aVector3
that can be used elsewhere.func getRootMotionPositionAccumulator(
) -> Vector3 Retrieve the blended value of the position tracks with the
rootMotionTrack
as aVector3
that can be used elsewhere.func getRootMotionRotation(
) -> Quaternion Retrieve the motion delta of rotation with the
rootMotionTrack
as aQuaternion
that can be used elsewhere.func getRootMotionRotationAccumulator(
) -> Quaternion Retrieve the blended value of the rotation tracks with the
rootMotionTrack
as aQuaternion
that can be used elsewhere.func getRootMotionScale(
) -> Vector3 Retrieve the motion delta of scale with the
rootMotionTrack
as aVector3
that can be used elsewhere.func getRootMotionScaleAccumulator(
) -> Vector3 Retrieve the blended value of the scale tracks with the
rootMotionTrack
as aVector3
that can be used elsewhere.func hasAnimation(name: StringName
) -> Bool Returns
true
if theAnimationPlayer
stores anAnimation
with keyname
.func hasAnimationLibrary(name: StringName
) -> Bool Returns
true
if theAnimationPlayer
stores anAnimationLibrary
with keyname
.func removeAnimationLibrary(name: StringName
) Removes the
AnimationLibrary
associated with the keyname
.func renameAnimationLibrary(name: StringName, newname: StringName
) Moves the
AnimationLibrary
associated with the keyname
to the keynewname
.
Show implementation details (1)
Hide implementation details
func _postProcessKeyValue(animation: Animation?, track: Int32, value: Variant, object: Object?, objectIdx: Int32
) -> Variant A virtual function for processing after key getting during playback.
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.