IC Python API:RLPy RPyTimerCallback

From Reallusion Wiki!
Revision as of 20:11, 31 March 2019 by Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Inheritance== This class inherits public member functions from: *RLPy.RCallback =...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Main article: Modules.

Inheritance

This class inherits public member functions from:

Detailed Description

This class is used to register callbacks for timer event.

class MyPyTimerCallback(RLPy.RPyTimerCallback):
 def __init__(self):
   RLPy.RPyTimerCallback.__init__(self)

 def Timeout(self):
   print ("timeout")

timer = RLPy.RPyTimer()
timer.SetInterval(100)
# register callback
timer_callback = MyPyTimerCallback()
timer.RegisterPyTimerCallback(timer_callback)
# start timer
timer.Start()

Timeout

RLPy.RPyTimerCallback.Timeout ( self )

This function is called when the timer times out.