Files
gymkhana-actions/docs/api/ESCAnimationPlayer.md
Julian Murgia fc3ea147a7 Implement save overwrite confirmation (#368)
* Implement save overwrite confirmation + fixed pause game not pausing game execution.

* docs: Automatic update of API docs

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
2021-08-13 09:28:38 +02:00

1.9 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

is_valid

func is_valid() -> bool

Return true if the ESCAnimationPlayer node is valid, ie. it has a valid player node. Returns: true if the ESCAnimationPlayer has a valid player node, else false

Signals

  • signal animation_finished(name):