gre.animation_get_state(name, id)
Get the current state of an animation. Possible states are:
-
gre.STATE_NOT_FOUND - The animation does not exist
-
gre.STATE_NOT_RUNNING - The animation is not currently running
-
gre.STATE_PAUSED - The animation is running but is currently paused and not updating data
-
gre.STATE_RUNNING - The animation is running and updating data
-
gre.STATE_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.
Parameters: name The original name of the animation id If the animation was triggered with a specific id, this can be used to find the specific instance of a running animation. Returns: table with state and context keys state this is one of gre.STATE_NOT_FOUND, gre.STATE_NOT_RUNNING, gre.STATE_PAUSED, gre.STATE_RUNNING, gre.STATE_COMPLETE progress this is a number between 0-1 which describes the current progress of the animation.