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

The Typer object

The WordList class supports the import and tokenization of a dictionary, generating an array of words on a line by line basis. The GetRandomWord function returns a randomly selected word from the dictionary and the CompareWord function determines whether a typed word matches the chosen one entirely, partially, or not at all. Having now created this class, we begin work here on the Typer class, which actually accepts typed input from the keyboard, processes that input and displays UI complements for player feedback. Let's start by creating an object hierarchy. Create a new, empty object at the scene origin to act as the topmost node for the Typer. Name the object Typer and then create a Canvas object as a child. The canvas contains ...

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