Version: 1.0.0
Author: Ulises Freitas
Email: [email protected]
Category: Media
The intemplateanimations
module allows you to create and manage animations within your game templates. It provides a simple interface to define animations using frames from graphic assets, ensuring that each animation has a unique name.
- Create animations with a unique name and specified frames.
- Automatically handle texture creation based on defined animations.
- Validate the existence of graphic assets and frames.
To use the intemplateanimations
module, ensure that it is included in your project. You can activate the intemplateanimations
catmod.
in a spritesheet of 38 frames, we know that 0,1,2 are the frames correspondin to idle
animation
Then into the template just create a new animarion field and add Idle
and frames 0,1,2, and thats it.
Later you call something like this
setTexture(NameOfYourTemplateIdle);
this.loop = true;
this.play();
In catnip like: