My contribution 2
I have now integrated the previously created sprites into our game.
If the player is moving, a variable called anim_count ticks up. The names of the sprites are named in such a way that I can read them into the function and check 2 ints to determine which is the correct image to be loaded.
AvaX-cycleY
The X value represents the level that the set of sprites is used, and the Y value represents where that image goes in the sequence. The sprite component loads the texture of the next sprite in the sequence.
If anim_count >= 5, the animation must have ended so it hard resets to 0 to begin the cycle again.
Finally, if the player is no longer grounded (Jumping or falling) the anim_count is hard set at 2, which in every sequence is a sprite where the player is in a pose similar to that of a jump. This stops to running animation playing when the character is in the air, and instead hold a pose similar to the jump pose of a Mario sprite.
Get Ex-Machina
Ex-Machina
LLP Assignment 2
Status | Prototype |
Category | Other |
Author | Luke Tolchard |
More posts
- PostmortemApr 11, 2019
- My contribution 3Apr 11, 2019
- My contribution 1Apr 11, 2019
- TaskApr 11, 2019
Leave a comment
Log in with itch.io to leave a comment.