ESCAnimationPlayer

Extends: Node

Description

An abstraction class to expose the same animation methods for both AnimatedSprite and AnimationPlayer.

Members

Signals

animation_finished

signal animation_finished(name: Variant)

Signal emitted when the animation finished playing.

Parameters

Name

Type

Description

Required?

name

Variant

Name of the animation that completed playback.

yes

Methods


get_animation

func get_animation() -> String

Return the currently playing animation.

Parameters

None.

Returns

Returns a String value. (String)


get_animations

func get_animations() -> PackedStringArray

A list of all animation names.

Parameters

None.

Returns

Returns a list of all animation names. (PackedStringArray)


is_playing

func is_playing() -> bool

Whether the animation is playing.

Parameters

None.

Returns

Returns a bool value. (bool)


stop

func stop() -> void

Stop the animation.

Parameters

None.

Returns

Returns nothing.


play

func play(name: String, backwards: bool) -> void

Play the animation.

Parameters

Name

Type

Description

Required?

name

String

Animation name to play.

yes

backwards

bool

Play backwards.

no

Returns

Returns nothing.


play_backwards

func play_backwards(name: String) -> void

Play the given animation backwards.

Parameters

Name

Type

Description

Required?

name

String

Animation name to play in reverse.

yes

Returns

Returns nothing.


has_animation

func has_animation(name: String) -> bool

Check if the given animation exists.

Parameters

Name

Type

Description

Required?

name

String

Animation name to test for availability.

yes

Returns

Returns a bool value. (bool)


seek_end

func seek_end(name: String) -> void

Play an animation and directly skip to the end.

Parameters

Name

Type

Description

Required?

name

String

Animation name to jump to the last frame of.

yes

Returns

Returns nothing.


get_length

func get_length(name: String) -> float

Get the length of the specified animation.

Parameters

Name

Type

Description

Required?

name

String

Animation name whose duration should be returned.

yes

Returns

Returns a float value. (float)


is_valid

func is_valid() -> bool

Return true if the ESCAnimationPlayer node is valid, ie. it has a valid player node.

Parameters

None.

Returns

Returns a bool value. (bool)