How can I apply different actions to different parts of a 2D character?

Posted by Praveen Sharath on Game Development See other posts from Game Development or by Praveen Sharath
Published on 2012-03-23T19:49:58Z Indexed on 2012/03/23 23:40 UTC
Read the original article Hit count: 295

Filed under:
|
|

I am developing a 2D platform game in Java. The player has a gun in his hand every time. He needs to walk and shoot with the gun(arrow keys for walk and X key to shoot). The walk cycle takes 6 frames and i am able to import the sprite sheet and animate the sequence when I press arrow key. But i need to add the gun motion. The player holds the gun upwards and when X key is pressed he brings it straight and shoots. How to implement the walk + shoot action?

© Game Development or respective owner

Related posts about 2d

Related posts about animation