Game win sequence
We will create a sequence of GUI elements that occur when the player wins the game. This win sequence will consist of three stages.
Firstly, animated text informing the player that lighting the fire has won them the game will appear:
We will animate these messages onto the screen using a script technique called linear interpolation—a method of transition from one value to another, over a defined period of time. Abbreviated to Lerp in code, linear interpolation is useful for many scripting tasks and as such is important to learn.
After making use of Lerp to animate through code, we will then dive into the Unity Animation window, and look at how we can use that to visually design animations for objects.
Using the Animation window we will create the second part of the win sequence in which the screen fades to black and further animated text will appear to tell the player the game is loading, before returning to the main menu:
The fader and Loading.. text will be created as GUITextures...