Time for action - rig up the textures

We know most of what we need to get started. There's just a little trick with rotating the textures that we have to learn. But, first, let's set up our clock with the variables we'll need to draw the textures to the screen.

  1. Add variables for the new pie clock textures at the top of the clockScript:
    var clockFGMaxWidth:float; // the starting width of the foreground bar
    var rightSide:Texture2D;
    var leftSide:Texture2D;
    var back:Texture2D;
    var blocker:Texture2D;
    var shiny:Texture2D;
    var finished:Texture2D;
    
  2. In the Hierarchy panel, select the Clock Game Object.
  3. Just as we did with the bar clock, drag-and-drop the pie clock textures from the Project panel into their respective slots in the clockScript component ...

Get Unity 3D Game Development by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.