Nuclide
Software Development Kit for id Technology
|
This class provides a way to trigger a function in the future.
It has the ability to clean itself up afterwards, too.
Public Member Functions | |
void | NSTimer (void) |
virtual void | RunTimer (void) |
Runs the timer that's set up. More... | |
nonvirtual void | StopTimer (void) |
Invalidates the timer when called. More... | |
virtual void | OnRemoveEntity (void) |
Handles what happens before the entity gets removed from the client game. More... | |
virtual void | Save (float) |
Handles saving a copy of this entity to a given filehandle. More... | |
virtual void | Restore (string, string) |
Similar to NSIO::SpawnKey but for save-game fields. More... | |
Static Public Member Functions | |
static NSTimer | ScheduleTimer (entity, void(), float, bool) |
When called, creates and sets up a new timer, starts immediately. More... | |
static NSTimer | TemporaryTimer (entity, void(), float, bool) |
When called, creates a self garbage collecting version of a timer. More... | |
static NSTimer | SetupTimer (entity, void(), float, bool) |
When called, sets up a timer that has to be run manually later. More... | |
void NSTimer::NSTimer | ( | void | ) |
|
virtual |
Handles what happens before the entity gets removed from the client game.
Reimplemented from NSIO.
|
virtual |
Similar to NSIO::SpawnKey
but for save-game fields.
Whatever you write into file handles within your NSIO::Save()
method needs to be read back in here.
Reimplemented from NSEntity.
|
virtual |
Runs the timer that's set up.
|
virtual |
Handles saving a copy of this entity to a given filehandle.
Within you want to use the NSIO::SaveFloat() etc. methods to write the internal member attributes to the specified file handle.
Reimplemented from NSEntity.
|
static |
When called, creates and sets up a new timer, starts immediately.
|
static |
When called, sets up a timer that has to be run manually later.
void NSTimer::StopTimer | ( | void | ) |
Invalidates the timer when called.
|
static |
When called, creates a self garbage collecting version of a timer.