natiny.animator.get_playing
natiny.animator.get_playing(animator) -> playing
Returns the animator's playback state.
Parameters
| Name | Type | Description |
|---|---|---|
animator |
number |
Animator handle from natiny.animator.create |
Returns
| Type | Description |
|---|---|
boolean |
true after play until playback is paused, stopped, or a non-looping clip with a positive duration reaches an end; false for a stale nonzero animator handle |
Example
if not natiny.animator.get_playing(hero_action) then
natiny.animator.play(hero_action, "Idle", 0.2)
end