skeleton:addEmptyAnimation()

Type: function

Overview

Queues an empty animation after the current one, fading out over mixDuration (ms) and starting after delay (ms).

Syntax

local trackEntry = skeleton:addEmptyAnimation(trackIndex, mixDuration, delay)

Parameters

  • trackIndex (required):

    number – The track index to queue the empty animation.

  • mixDuration (required):

    number – The duration of the fade-out, in milliseconds.

  • delay (required):

    number – The delay in milliseconds before starting, as for skeleton:addAnimation(). Omitting it raises.

Return value

  • trackEntry – The trackEntry of the queued empty animation.

Example

spineboy:setAnimation(1, "shoot", false)
spineboy:addEmptyAnimation(1, 300, 100)  -- fade out 0.3s, start after 0.1s