Lua API
0.4.0
Game Engine
|
Functions | |
getCurrentAnimation (object) | |
Retrieve the current animation ID the given object uses. More... | |
changeAnimation (object, animationId) | |
Plays an animation. More... | |
isAnimationOver (object) | |
Checks if the current animation has finished playing. More... | |
getAnimationSpeed (object) | |
Retrieves the speed of the current animation. More... | |
setAnimationSpeed (object, speed) | |
Changes the speed of the current animation. More... | |
getCurrentFrame (object) | |
Retrieves the current frame in the current animation. More... | |
setCurrentFrame (object, frame) | |
Jumps to the given frame of the current animation. More... | |
changeAnimation | ( | object | , |
animationId | |||
) |
Plays an animation.
Changes the current animation to the given one. No animation blending is done.
object | The animated object. |
animationId | The new animation to play. |
getAnimationSpeed | ( | object | ) |
Retrieves the speed of the current animation.
TODO: Get data about the speed unit!
object | The animated object. |
getCurrentAnimation | ( | object | ) |
Retrieve the current animation ID the given object uses.
object | The object which is animated. |
getCurrentFrame | ( | object | ) |
Retrieves the current frame in the current animation.
object | The animated object. |
isAnimationOver | ( | object | ) |
Checks if the current animation has finished playing.
Also returns true for looped animations if the animation finished this frame.
object | The animated object. |
setAnimationSpeed | ( | object | , |
speed | |||
) |
Changes the speed of the current animation.
TODO: Get data about the speed unit!
object | The animated object. |
speed | The animation speed. |
setCurrentFrame | ( | object | , |
frame | |||
) |
Jumps to the given frame of the current animation.
object | The animated object. |
frame | The the frame to jump to. |