Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
AnimationMethodCallMode
AnimationPlayer.swift:45enum AnimationMethodCallMode
Cases
case deferred
For backward compatibility. See
deferred
.case immediate
For backward compatibility. See
immediate
.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (34) members.
Types
enum AnimationProcessCallback
class Signal1
Signal support.
class Signal2
Signal support.
Type members
Instance members
var animationChanged: Signal2
Emitted when a queued animation plays after the previous animation finished. See also
queue(name:)
.var assignedAnimation: String
If playing, the current animation’s key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also
currentAnimation
.var autoplay: String
The key of the animation to play when the scene loads.
var currentAnimation: String
The key of the currently playing animation. If no animation is playing, the property’s value is an empty string. Changing this value does not restart the animation. See
play(name:customBlend:customSpeed:fromEnd:)
for more information on playing animations.var currentAnimationChanged: Signal1
Emitted when
currentAnimation
changes.var currentAnimationLength: Double
The length (in seconds) of the currently playing animation.
var currentAnimationPosition: Double
The position (in seconds) of the currently playing animation.
var movieQuitOnFinish: Bool
If
true
and the engine is running in Movie Maker mode (seeMovieWriter
), exits the engine withquit(exitCode:)
as soon as an animation is done playing in thisAnimationPlayer
. A message is printed when the engine quits for this reason.var playbackDefaultBlendTime: Double
The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision.
var speedScale: Double
The speed scaling ratio. For example, if this value is
1
, then the animation plays at normal speed. If it’s0.5
, then it plays at half speed. If it’s2
, then it plays at double speed.func animationGetNext(animationFrom: StringName
) -> StringName Returns the key of the animation which is queued to play after the
animationFrom
animation.func animationSetNext(animationFrom: StringName, animationTo: StringName
) Triggers the
animationTo
animation when theanimationFrom
animation completes.func clearQueue(
) Clears all queued, unplayed animations.
func getBlendTime(animationFrom: StringName, animationTo: StringName
) -> Double Returns the blend time (in seconds) between two animations, referenced by their keys.
func getMethodCallMode(
) -> AnimationPlayer.AnimationMethodCallMode For backward compatibility. See
AnimationMixer.AnimationCallbackModeMethod
.func getPlayingSpeed(
) -> Double Returns the actual playing speed of current animation or
0
if not playing. This speed is thespeedScale
property multiplied bycustom_speed
argument specified when calling theplay(name:customBlend:customSpeed:fromEnd:)
method.func getProcessCallback(
) -> AnimationPlayer.AnimationProcessCallback For backward compatibility. See
AnimationMixer.AnimationCallbackModeProcess
.func getQueue(
) -> PackedStringArray Returns a list of the animation keys that are currently queued to play.
func getRoot(
) -> NodePath For backward compatibility. See
rootNode
.func isPlaying(
) -> Bool Returns
true
if an animation is currently playing (even ifspeedScale
and/orcustom_speed
are0
).func pause(
) Pauses the currently playing animation. The
currentAnimationPosition
will be kept and callingplay(name:customBlend:customSpeed:fromEnd:)
orplayBackwards(name:customBlend:)
without arguments or with the same animation name asassignedAnimation
will resume the animation.func play(name: StringName, customBlend: Double, customSpeed: Double, fromEnd: Bool
) Plays the animation with key
name
. Custom blend times and speed can be set.func playBackwards(name: StringName, customBlend: Double
) Plays the animation with key
name
in reverse.func queue(name: StringName
) Queues an animation for playback once the current one is done.
func seek(seconds: Double, update: Bool, updateOnly: Bool
) Seeks the animation to the
seconds
point in time (in seconds). Ifupdate
istrue
, the animation updates too, otherwise it updates at process time. Events between the current frame andseconds
are skipped.func setBlendTime(animationFrom: StringName, animationTo: StringName, sec: Double
) Specifies a blend time (in seconds) between two animations, referenced by their keys.
func setMethodCallMode(AnimationPlayer.AnimationMethodCallMode
) For backward compatibility. See
AnimationMixer.AnimationCallbackModeMethod
.func setProcessCallback(mode: AnimationPlayer.AnimationProcessCallback
) For backward compatibility. See
AnimationMixer.AnimationCallbackModeProcess
.func setRoot(path: NodePath
) For backward compatibility. See
rootNode
.func stop(keepState: Bool
) Stops the currently playing animation. The animation position is reset to
0
and thecustom_speed
is reset to1.0
. See alsopause
.
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.