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])
trackIndex(optional):number– The track index to query.
Return value:¶
string or nil– The current animation name, or nil if none.
Example:¶
print("Track #1 animation:", hero:getCurrentAnimation(1))