skeleton:findAnimation()¶
Type:
functionSee also: skeleton
Overview¶
Checks if an animation with the given name exists in the skeleton’s data.
Syntax¶
local exists = skeleton:findAnimation(animationName)
Parameters¶
animationName(required):string– Name of the animation to check.
Return value¶
boolean– true if animation is found, false otherwise.
Example¶
local canDance = spineboy:findAnimation("dance")
if canDance then
spineboy:setAnimation(1, "dance", true)
end