September 2011
Beginner
408 pages
9h 52m
English
Let's rough in a few empty functions and three variables that we'll need to make the clock work.
var clockIsPaused : boolean = false;
var startTime : float; //(in seconds)
var timeRemaining : float; //(in seconds)
function Awake()
{
}
function Update() {
if (!clockIsPaused)
{
// make sure the timer is not paused
DoCountdown();
}
}
function DoCountdown() {
}
function PauseClock()
{
clockIsPaused = true;
}
function UnpauseClock()
{
clockIsPaused = false;
}
function ShowTime()
{
}
function TimeIsUp()
{
}Here, we've created a list of functions that we'll probably need to get our clock working. ...
Read now
Unlock full access