Chapter 6. Game #2 – Robot Repair Part 2
As we've learned, building the game part of the game is only half the battle. A lot of your sweat goes into creating what's around the game—the buttons, menus, and prompts that lead the player in, around, and through your game. We're right in the middle of learning how to display buttons and other UI (user interface) controls on top of our Unity games. We'll take a break from the 3D environment, adding game logic to the UI controls to produce a fully functioning 2D game with the Unity GUI alone.
In this chapter, we'll:
Discover some code to help us better position our UI controls on the screen
Learn to control when the player can and can't interact with our game
Unleash the terrifyingly awesome power of random numbers
Hide and show UI controls
Detect winning conditions
Show a "Win" screen when the player finishes the game