Scenes, Entities and animations¶
Scene manager¶
See in this example how to use the scene manager.
Entities¶
If you want a player or an enemy or some moving object in your game, you can use an entity, thats an object that helps you manage things in your game:
Draw rect with entity¶
If you want to draw a rectangle that is basically in your entity, then you do it like this:
Then you can draw it with:Draw image with entity¶
If you want to draw a image on your entity, then you do this:
Then you can draw it with:
Custom animations with entities¶
Fusion has some build-in features into entity system to make animations more easy, here are some ways to use it
Load frames¶
First of all, you need to load frames, and you can do this using this way:
Setting current frame¶
You can set the current frame with this function
Getting current frame¶
To get the current frame, run:
Drawing current frame¶
To draw current frame, use this function
Animation system (Early stages)¶
If you want to draw a animation, then you can do it this way
Loading the animations¶
To load the animation, run
Drawing animation¶
To draw it then, run: