Files
gymkhana-actions/docs/api/ESCAnimationPlayer.md
2021-08-10 21:35:01 +02:00

1.7 KiB

ESCAnimationPlayer

Extends: Node

Description

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

Method Descriptions

_init

func _init(node: Node)

Create a new animation player

Parameters

  • node: The actual player node

get_animation

func get_animation() -> String

Return the currently playing animation Returns the currently playing animation name

get_animations

func get_animations() -> PoolStringArray

Returns a list of all animation names Returns A list of all animation names

is_playing

func is_playing() -> bool

Wether the animation is playing Returns: Wether the animation is playing

stop

func stop()

Stop the animation

play

func play(name: String, backwards: bool = false)

Play the animation

Parameters

  • name: The animation name to play
  • backwards: Play backwards

play_backwards

func play_backwards(name: String)

Play the given animation backwards

Parameters

  • name: Animation to play

has_animation

func has_animation(name: String) -> bool

Check if the given animation exists

Parameters

  • name: Name of the animation to check Returns Wether the animation player has the animation

seek_end

func seek_end(name: String)

Play an animation and directly skip to the end

Parameters

  • name: Name of the animation to play

Signals

  • signal animation_finished(name):