Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
AnimationCallbackModeDiscrete
AnimationMixer.swift:68enum AnimationCallbackModeDiscrete
Cases
case dominant
An
Animation/UpdateMode/updateDiscrete
track value takes precedence when blendingAnimation/UpdateMode/updateContinuous
orAnimation/UpdateMode/updateCapture
track values andAnimation/UpdateMode/updateDiscrete
track values.case recessive
An
Animation/UpdateMode/updateContinuous
orAnimation/UpdateMode/updateCapture
track value takes precedence when blending theAnimation/UpdateMode/updateContinuous
orAnimation/UpdateMode/updateCapture
track values and theAnimation/UpdateMode/updateDiscrete
track values. This is the default behavior forAnimationPlayer
.case forceContinuous
Always treat the
Animation/UpdateMode/updateDiscrete
track value asAnimation/UpdateMode/updateContinuous
withAnimation/InterpolationType/interpolationNearest
. This is the default behavior forAnimationTree
.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (42) members.
Types
enum AnimationCallbackModeMethod
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 callbackModeDiscrete: AnimationMixer.AnimationCallbackModeDiscrete
Ordinarily, tracks can be set to
Animation/UpdateMode/updateDiscrete
to update infrequently, usually when using nearest interpolation.var callbackModeMethod: AnimationMixer.AnimationCallbackModeMethod
The call mode used 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 mixerApplied: SimpleSignal
Notifies when the blending result related have been applied to the target objects.
var mixerUpdated: SimpleSignal
Notifies when the property related process have been updated.
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 which node path references will travel from.
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 capture(name: StringName, duration: Double, transType: Tween.TransitionType, easeType: Tween.EaseType
) If the animation track specified by
name
has an optionAnimation/UpdateMode/updateCapture
, stores current values of the objects indicated by the track path as a cache. If there is already a captured cache, the old cache is discarded.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 theAnimationMixer
stores anAnimation
with keyname
.func hasAnimationLibrary(name: StringName
) -> Bool Returns
true
if theAnimationMixer
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, objectId: UInt, objectSubIdx: Int32
) -> Variant A virtual function for processing after getting a key 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.