Chapter 4
Power-Ups and Singletons
CMOD will feature a total of four different power-up types, scattered around the level for collection. First, the game-critical power-up of Cash (see Figure 4-1). Each level features multiple Cash Power-Ups, and when all of these are collected without the Player dying, the level is classified as complete. Second, a weapon-upgrade power-up that equips the Player with the gun weapon. Third, an ammo-restore power-up to replenish the gun ammo back to maximum. And fourth, a health-restore power-up to restore Player health back to maximum. All four of these power-ups will be collected and applied when the Player collides with (or walks into) them. To implement this behavior efficiently and to integrate it with ...
Get Pro Unity Game Development with C# 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.