IC Python API:RLPy RPyTimerCallback

From Reallusion Wiki!
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.