Actual version: 1.0
It is as easy to use as including only three lines of code, plus the require "motion" line.
Actual functionalities:
Code: Select all
motion.newAnimation(<name:string>, <frames:table>, <interval:table/number/0>) : creates a new animation
motion.update([name:string]) : updates animations
motion.setFrame(<name:string>, <frame:number>) : changes an animation frame to the specified frame number
motion.get(<name:string>) : returns the image corresponding to the specified animation
motion.delete(<name:string>, [frameNum:number]) : removes the specified animation
motion.info(<name:string>) : returns the number of frames and the actual frame of the specified animation
Ofc more functionalities are in the ToDo, such as. Deleted items are already implemented and released.
- allow to define frames in different ways instead of having to provide every file name
- looping and non-looping animations (are destroyed once the animation reaches the last frame)
- something else?
Get the .lua right now!!!
Also available, an example showing most of the functionalities.
Enjoy.