gre.animation get state

gre.animation_get_state(name, [id])

Get the current state of an animation. Possible states are:

  • gre.ANIMATION_NOT_FOUND - The animation does not exist

  • gre.ANIMATION_NOT_RUNNING - The animation is not currently running

  • gre.ANIMATION_PAUSED - The animation is running but is currently paused and not updating data

  • gre.ANIMATION_RUNNING - The animation is running and updating data

  • gre.ANIMATION_COMPLETE - The animation has finished executing

This function does not differentiate between an animation that has reached completion and an animation that has not started.

If the 'id' parameter is specified, the 'name' parameter will only be used if there are no active animation matching the current ID.

Parameters: name The original name of the animation id Either a string id, or table with 'id'. (Optional) Returns: table with state and context keys state One of gre.ANIMATION_NOT_FOUND, gre.ANIMATION_NOT_RUNNING, gre.ANIMATION_PAUSED, gre.ANIMATION_RUNNING, gre.ANIMATION_COMPLETE progress A number between 0-1 which describes the current progress of the animation. reverse A boolen indicating if the animation is currently reversed. duration The total duration of the animation in milliseconds.

Was this article helpful?
0 out of 0 found this helpful