When the internal CRaPI clock ticks the subsribed events will be raised due to its specified raise condtions TickPlayOn
To get these events you have to subscribe them
| Event Type | Reason |
|---|---|
| TickPlayOn | Raised every specified time interval if the games state is play on |
| TickPlayOff | Raised every specified time interval if the game state is play off |
| TickOnCycleSoonEnding | Raised when cycle is soon ending |
| TickOverTimeOnCycle | Raised when time has passed a cycle duration |
This sample shows how to subscribe events in your code.
Clock mClock = new Clock();
mClock.TickPlayOn += new TimeEventHandler(OnTick);
mClock.TickPlayOff += new TimeEventHandler(OnTick);
public void OnTick(object sender, TimeEventArgs e)
{
Do something...
}
Clock Class | TeamYaffa.CRaPI Namespace