Moving a sprite?
I am making a Mario game for the Zen. I have made arrow buttons, and drawn them to the screen, but how can I code the LEFT, RIGHT and JUMP, (moving a sprite)
You just need to keep track of your player's coordinates, and always draw the sprite based on the players current position, and in your LEFT, RIGHT and JUMP functions you modify its coordinates on the screen by adding or subtracting.
That's the quick answer, the long one is for you to check my code for Neko Apprentice, it has arrow buttons which initiates movement.
|All times are GMT -5. The time now is 05:36 AM.|