TGame.OnClockTick

From Soldat Community Wiki
Revision as of 13:27, 26 July 2013 by Mighty (talk | contribs) (Example)
Jump to: navigation, search
property OnClockTick
 Access mode: RW
 Event handler type: TOnClockTickEvent
 Event handler declaration: procedure (Ticks: Integer);

Description

Event property called on iddle in frequency described by TickThreshold

Example

 procedure MyOnClockTickHandler(Ticks: Integer);
 begin
   WriteLn('OnClockTick event called: ' + IntToStr(Ticks));
 end;

 // ...

 begin
   // assign OnClockTick handler
   Game.OnClockTick := @MyOnClockTickHandler;

   // ...

   // unassign
   Game.OnClockTick := nil;
 end;