Lysa.nodes  0.0
Lysa 3D Engine
AnimationPlayer Class Referenceabstract

Detailed Description

A node that plays skeletal or property animations from an asset's animation library.

Inherits from: Node

Lua full name: lysa.nodes.AnimationPlayer

Public Member Functions

nil set_current_library (library: string)
 Selects the active animation library by name. More...
 
nil play (name: string|nil)
 Starts an animation by name; pass nil or an empty string to replay the current animation. More...
 
nil play_backwards (name: string|nil)
 Starts an animation in reverse by name; pass nil or empty string for the current animation. More...
 
nil stop ()
 Stops the currently playing animation and resets to the first frame. More...
 
nil seek (time: number)
 Seeks the animation to the given time in seconds without changing play state. More...
 
nil set_auto_start (auto: boolean)
 Sets whether the player automatically starts its animation when the node enters the scene tree. More...
 
nil set_target_path (path: string)
 Overrides the target node path for all animation tracks (useful when instancing shared animations on different nodes). More...
 

Properties

string current_animation_name
 The name of the currently active animation. (read-only)
 
string current_animation
 The name of the animation currently queued or playing.
 
boolean is_playing
 True if an animation is currently playing. (read-only)
 

Member Function Documentation

nil set_current_library ( string  library)

Selects the active animation library by name.

Parameters
librarystring
nil play ( string|nil  name)

Starts an animation by name; pass nil or an empty string to replay the current animation.

Parameters
namestring|nil
nil play_backwards ( string|nil  name)

Starts an animation in reverse by name; pass nil or empty string for the current animation.

Parameters
namestring|nil
nil stop ( )

Stops the currently playing animation and resets to the first frame.

nil seek ( number  time)

Seeks the animation to the given time in seconds without changing play state.

Parameters
timenumber
nil set_auto_start ( boolean  auto)

Sets whether the player automatically starts its animation when the node enters the scene tree.

Parameters
autoboolean
nil set_target_path ( string  path)

Overrides the target node path for all animation tracks (useful when instancing shared animations on different nodes).

Parameters
pathstring

Property Documentation

string current_animation_name

The name of the currently active animation. (read-only)

string current_animation

The name of the animation currently queued or playing.

boolean is_playing

True if an animation is currently playing. (read-only)