Book Image

Mastering Unity 5.x

By : Alan Thorn
Book Image

Mastering Unity 5.x

By: Alan Thorn

Overview of this book

Mastering Unity 5.x is for developers wishing to optimize the features of Unity 5.x. With an in-depth focus on a practical project, learn all about Unity architecture and impressive animation techniques. With this book, produce fun games with confidence.
Table of Contents (16 chapters)
Mastering Unity 5.x
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

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. When a failed match occurs, the player's input is reset and they must retype the word from the first letter.

  • Partial word matches: A partial match occurs when the player is on their way to entering and completing a word but has yet to type every...