1111
This commit is contained in:
42
CallBack/Timer_Dispatch/Timer_Dispatch.md
Normal file
42
CallBack/Timer_Dispatch/Timer_Dispatch.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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());
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user