Table of Contents | ||
|
||
RemoveAll | ||
Purpose Clears the list of all timers or all of a certain type of timer |
||
Protoype void CTimerMngr::RemoveAll (int i_ID = -1) |
||
Parameters
|
||
Description This function removes all timers from the manager. It can also remove only a select type of timer as well. When a timer is added to the manager it can be assigned an ID number. So say the CTextMngr manager adds a whole bunch of timers when it is initialized. It gives each of its timers a numeric ID. Then, when the CTextMngr manager unloads all its objects, instead of having to iterate through each one and destroy its timer, it can call this function with the ID that identifies all of the timers created by it and this function destroys only them. There are three managers that make use of this feature and have their own IDs which are defined as CTEXT_ID, CSPRITE_ID and CTILEMNGR_ID. |
||
Use CTimerMngr timer; // destroy all timers timer.RemoveAll(); // destroy only CText timers timer.RemoveAll(CTEXT_ID); |
||
|
||
|