SimEvent
Engine/source/console/simEvents.h
Represents a queued event in the sim.
Public Attributes
of addition to the list.
Unique ID.
Public Functions
Detailed Description
Represents a queued event in the sim.
Sim provides an event queue for your convenience, which can be used to schedule events. A few things which use this event queue:
- The scene lighting system. In order to keep the game responsive while scene lighting occurs, the lighting process is divided into little chunks. In implementation terms, there is a subclass of SimEvent called SceneLightingProcessEvent. The process method of this subclass calls into the lighting code, telling it to perform the next chunk of lighting calculations. - The schedule() console function uses a subclass of SimEvent called SimConsoleEvent to keep track of scheduled events.
Public Attributes
SimObject * destObject
of addition to the list.
Object on which this event will be applied.
SimEvent * nextEvent
Linked list details - pointer to next item in the list.
U32 sequenceCount
Unique ID.
These are assigned sequentially based on order
SimTime startTime
When the event was posted.
SimTime time
When the event is scheduled to occur.
Public Functions
SimEvent()
~SimEvent()
Destructor.
process(SimObject * object)
A dummy virtual destructor is required so that subclasses can be deleted properly.
Function called when event occurs.
This is where the meat of your event's implementation goes.
See any of the subclasses for ideas of what goes in here.
The event is deleted immediately after processing. If the object referenced in destObject is deleted, then the event is not called. The even will be executed unconditionally if the object referenced is NULL.
Parameters:
object | Object stored in destObject. |
Reimplemented by: SimDelegateEvent, EffectronFinishStartupEvent, afxEffectron::ObjectDeleteEvent, SpellFinishStartupEvent, afxMagicSpell::ObjectDeleteEvent, SelectronFinishStartupEvent, afxSelectron::ObjectDeleteEvent, ObjectDeleteEvent, afxProjectileDeleteEvent, ProcessMasterQueryEvent, ProcessPingEvent, ProcessPacketEvent, HeartbeatEvent, SimConsoleEvent, SimConsoleThreadExecEvent, SimObjectDeleteEvent, DecalRoadUpdateEvent, ForestBrushToolEvent, PopUpNotifyRemoveEvent, TerrainProcessActionEvent, sgSceneLightingProcessEvent, ExecuteCleanupEvent, NetDelayEvent, QuitEvent