O'Reilly logo

Mastering Unity 5.x 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

Matching words

Determining whether two words match is an important function for Dead Keys. When a player enters a word during combat, we must ascertain several features of that word compared to the chosen one from the word list:

  • Complete word matches: A complete word match occurs when the player fully and correctly types the selected word, letter for letter. This results in a zombie being killed and is a measure of progress in the scene. Detecting complete word matches is therefore important for progressing gameplay.
  • Failed matches: A failed word match occurs when the player's most recent keypress fails to match any selected words (there could be multiple zombies) and therefore invalidates any partial matches there may have been up to that point. ...

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