© Zarrar Chishti 2017

Zarrar Chishti, Cross Over to HTML5 Game Development, https://doi.org/10.1007/978-1-4842-3291-0_7

7. Take a Shot: Part 2

Zarrar Chishti

(1)Glasgow, UK

“If you do it right, it will last forever”

Massimo Vignelli

The good news is that we are near the end. The slightly bad news is that there will be a fair bit of coding in this chapter. So what will we see at the end of this chapter?

  • The gun will be able to fire on zombies.

  • The zombies will register the hits. If the maximum number of hits is reached, a zombie will turn into a bubble.

  • The bubble zombie will fly away into the distance.

  • We need to keep track of the number of times the gun has been fired, and require the user to reload when the maximum has been reached.

  • Finally, if a ...

Get Cross Over to HTML5 Game Development: Use Your Programming Experience to Create Mobile Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.