Sunday 16 January 2011

Bullets added

I've implemented some basic bullet code, allowing the player character to shoot. Basically, a click event is captured and a new bullet object is created at the player's position, with a velocity that will take it towards the click point.

As each bullet moves some collision detection takes place, and for the time being any zombie that gets in the way simply disappears (along with the bullet). Obviously this will be replaced with code to make the zombie take damage until it dies, whereupon it will fall over and persist for a few seconds until removed. Next up: blood effects!

No comments:

Post a Comment