Page tags

Add a new page

Overview

A timer that can be updated to keep track of in game events. The basic structure of the timer is very simple:

'time' is the duration the timer is set for
'timer' tick down from time to 0.

Every update subtracts 'timeLapsed' from 'timer' until it reaches 0.

void STimer::SetTimer(double) : sets a timer to go off at the time specified by 'double' 'time' will be updated to reflect this new value
void STimer::SetTimer() : sets timer to predefined value recorded by 'time'
bool STimer::RunTimer(double timeLapsed) ; subtracts the timeLapsed from the timer]
void STimer::ResetTimer() : Resets the timer]
bool STimer::IsReady() : returns true if the timer has ticked down and is ready to be used
double STimer::Length() returns 'time'