Book Image

Mastering Unity 2017 Game Development with C# - Second Edition

Book Image

Mastering Unity 2017 Game Development with C# - Second Edition

Overview of this book

Do you want to make the leap from being an everyday Unity developer to being a pro game developer? Then look no further! This book is your one-stop solution to creating mesmerizing games with lifelike features and amazing gameplay. This book focuses in some detail on a practical project with Unity, building a first-person game with many features. You'll delve into the architecture of a Unity game, creating expansive worlds, interesting render effects, and other features to make your games special. You will create individual game components, use efficient animation techniques, and implement collision and physics effectively. Specifically, we'll explore optimal techniques for importing game assets, such as meshes and textures; tips and tricks for effective level design; how to animate and script NPCs; how to configure and deploy to mobile devices; how to prepare for VR development; how to work with version control; and more. By the end of this book, you'll have developed sufficient competency in Unity development to produce fun games with confidence.
Table of Contents (9 chapters)

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 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 Typer. Name the object Typer and then create a Canvas object as a child. The canvas contains all objects for the associated UI:

Creating a Typer object

As with previous canvas components, we'll configure it to support multiple...