Difference between revisions of "TGame.OnClockTick"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with " '''''property OnClockTick''''' Access mode: RW ==Description== Event property called on iddle in frequency described by TickThreshold <br> ==Exma...")
 
m (Exmaple)
Line 16: Line 16:
  
 
  begin
 
  begin
   // assign OnClockTickHandler
+
   // assign OnClockTick handler
 
   Game.OnClockTick := @MyOnClockTickHandler;
 
   Game.OnClockTick := @MyOnClockTickHandler;
  

Revision as of 14:05, 24 July 2013

property OnClockTick
 Access mode: RW

Description

Event property called on iddle in frequency described by TickThreshold

Exmaple

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

 // ...

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

   // ...

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