Advertisement
orfeasel

TimerHandle

Dec 22nd, 2015
7,340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. void ATimerActor::BeginPlay()
  2. {
  3.     Super::BeginPlay();
  4.  
  5.     //Timer handler
  6.     FTimerHandle TimerHandle;
  7.  
  8.     //Activate the Timer
  9.     //1st Parameter: TimerHandle
  10.     //2nd Parameter: The Object related to this timer
  11.     //3rd Parameter: The function that is going to be fired
  12.     //4th Parameter: The loop time
  13.     //5th Parameter: True - if you want this timer to loop, false otherwise
  14.     GetWorld()->GetTimerManager().SetTimer(TimerHandle, this, &ATimerActor::DoAPeriodicCheck, LoopTime, true);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement