dp-s_doc/CallBack/Timer_Dispatch/Timer_Dispatch.md

691 B
Raw Blame History

Timer_Dispatch 回调函数文档

回调说明 Timer_Dispatch类用于在服务端中持续执行的HOOK。


注册方法

  • Cb_timer_dispatch_Func.rawset(Key,Function)

例子

function Test_Function() 
{
    print(Clock());
}
Cb_timer_dispatch_Func.rawset("Test", Test_Function);

or

function Test_Function() 
{
    print(Clock());
}
Cb_timer_dispatch_Func.Test <- Test_Function;

or

function Test_Function() 
{
    print(Clock());
}
Cb_timer_dispatch_Func["Test"] <- Test_Function;

or

Cb_timer_dispatch_Func.Test <- function () 
{
    print(Clock());
};