Developing a well-formatted countdown that changes

In this recipe, we are going to create a countdown that displays the time on the screen as minutes and seconds. However, to take this display a step further, as the time elapses, it will change color. Just as the radial timer graphically represents the time that passes, a colored numeric timer provides a similar function. For example, in moments during gameplay when there is intense action, a player may not necessarily have the time to focus on the timer, or he may actually lose track of the time that has elapsed. Whatever the case may be, another good way to indicate to the player the time as it is decreasing is through color. Therefore, as the player is engaged in gameplay, the color of the ...

Get Unity UI Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.