September 2011
Beginner
408 pages
9h 52m
English
With these Texture2D variables defined, and the images stored in those variables, we can control the images with our script. Let's lay down some code, and pick through the aftermath when we're finished:
isPastHalfway variable inside our OnGUI function:function OnGUI ()
{
var isPastHalfway:boolean = percent < 50;
(Confused? Remember that our percent variable means "percent remaining", not "percent elapsed". When percent is less than 50, we've passed the halfway mark.)
Read now
Unlock full access