42 lines
691 B
Markdown
42 lines
691 B
Markdown
# Timer_Dispatch 回调函数文档
|
||
|
||
**回调说明**:
|
||
`Timer_Dispatch`类用于在服务端中持续执行的HOOK。
|
||
|
||
---
|
||
|
||
**注册方法**:
|
||
- `Cb_timer_dispatch_Func.rawset(Key,Function)`
|
||
|
||
**例子**:
|
||
|
||
```squirrel
|
||
function Test_Function()
|
||
{
|
||
print(Clock());
|
||
}
|
||
Cb_timer_dispatch_Func.rawset("Test", Test_Function);
|
||
```
|
||
or
|
||
```squirrel
|
||
function Test_Function()
|
||
{
|
||
print(Clock());
|
||
}
|
||
Cb_timer_dispatch_Func.Test <- Test_Function;
|
||
```
|
||
or
|
||
```squirrel
|
||
function Test_Function()
|
||
{
|
||
print(Clock());
|
||
}
|
||
Cb_timer_dispatch_Func["Test"] <- Test_Function;
|
||
```
|
||
or
|
||
```squirrel
|
||
Cb_timer_dispatch_Func.Test <- function ()
|
||
{
|
||
print(Clock());
|
||
};
|
||
``` |