play

public boolean play(String name, boolean blendAnimation, boolean loop)

Play either a built-in state (idle, walk, attack, death, spawn) or a data-driven animation by name.

Return

true if the animation exists and was scheduled

Parameters

name

name of the animation/state (case-insensitive)

blendAnimation

if true, queue it behind the current; if false, interrupt immediately

loop

only applies for custom animations