What it does
animation.crossFadeState takes entityId, state, duration and layer. layer is optional.
Signature
animation.crossFadeState(entityId, state, duration, layer?)Arguments
entityIdstatedurationlayeroptional
Example · generated
function start() { animation.create('main', 'position', 30, 'float'); animation.crossFadeState('main', 'idle', 1);}animation.create is there to give the call something to act on; animation.crossFadeState is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.