its easy make a gun, end of gun place a (imagepoint)
wen player presses space - object/bullet spawns of gun imagepoint.
1. when bullet collides with walls destroy
2. when bullet hits enemy - enemy spawns Blood for example
then destroy enemy and destroy bullet.
3. subtract 1 ammo per shot.
wen ammo Zero disable ability to shoot through disabling or enabling a group or something etc.
check my game.
http://www.scirra.com/forum/topic53381_post334033.html#334033