Chapter 4. Continuing the Space Shooter

This chapter continues from the previous one in creating a twin-stick space shooter game. At this stage, we have a working game. At least, the gamer can control a spaceship using two axes: movement and rotation. WASD keys on the keyboard control movement (up, down, left, and right) and the mouse cursor controls rotation—the spaceship always rotates to face the cursor. In addition to player controls, the level features enemy characters that spawn at regular intervals, fly around the level, and move toward the player with hostile intent. Finally, both the player and enemies support a Health component, which means both are susceptible to damage and can be destroyed. Right now, however, the player lacks two ...

Get Unity 5.x By Example 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.