O'Reilly logo

Mastering Unity 2017 Game Development with C# - Second Edition by Alan Thorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comments

  • The Die function starts by incrementing the player score by the ScorePoints variable. This is an integer property and represents the number of points achieved for killing the enemy.
  • The game then determines whether a bonus should be unlocked, because a new record has been set by typing the full word (total number of letters) in the fastest time.
  • In addition, the ActiveEnemies field is a static integer property. Being static, it is, in effect, shared across all instances. It represents the total number of active enemies in the level, that is, the total number of enemies who are either searching, chasing, or attacking the player right now and, thus, who can be dispatched through typing combat.
  • As the enemy is destroyed, the ActiveEnemies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required