Friday 11 October 2013

2D game - Update#2

Today I created a little bit more of code to my game, working on the variable "Ammo", which basically displays how much ammo you have on your gun.

This sets the ammo to 5 when the game starts.

The code for shooting.
Note on the shooting code that it only broadcasts the shot IF ammo > 0. This is also very important when adding to the score, which I haven't done yet.

No comments :

Post a Comment