Player score

In many games, the player has a score to express their achievement and progress; Dead Keys will be no different, and we'll use a traditional scoring system. Specifically, the player will earn points for each zombie killed; we'll create the potential for assigning different scores (points) to different zombies, depending on difficulty and strength. To implement this, we'll work with UI elements and script, as we did earlier:

Creating a score display

The score feature will essentially be a text object displaying a numerical score, representing the kill count for zombies. Most games complement a score with some animation and effects. ...

Get Mastering Unity 2017 Game Development with C# - Second Edition 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.