skeleton:getCurrentAnimation()¶
Type:
functionSee also: skeleton
Overview¶
Retrieves the name of the animation currently playing on the specified track (default 1). Returns nil if no animation is active.
Syntax¶
local animName = skeleton:getCurrentAnimation([trackIndex])
Parameters¶
trackIndex(optional):number– The track index to query. Defaults to1.
Return value¶
string or nil– The current animation name, or nil if none.
Example¶
print("Track #1 animation:", spineboy:getCurrentAnimation(1))