42 lines
737 B
Markdown
42 lines
737 B
Markdown
# Chacter_Exit 回调函数文档
|
||
|
||
**回调说明**:
|
||
`Chacter_Exit`类用于处理游戏中的玩家退出事件。```选择角色```不会触发该回调
|
||
|
||
---
|
||
|
||
**注册方法**:
|
||
- `Cb_player_exit_Func.rawset(Key,Function)`
|
||
|
||
**例子**:
|
||
|
||
```squirrel
|
||
function Test_Function(SUser)
|
||
{
|
||
print("退出");
|
||
}
|
||
Cb_player_exit_Func.rawset("Test", Test_Function);
|
||
```
|
||
or
|
||
```squirrel
|
||
function Test_Function(SUser)
|
||
{
|
||
print("退出");
|
||
}
|
||
Cb_player_exit_Func.Test <- Test_Function;
|
||
```
|
||
or
|
||
```squirrel
|
||
function Test_Function(SUser)
|
||
{
|
||
print("退出");
|
||
}
|
||
Cb_player_exit_Func["Test"] <- Test_Function;
|
||
```
|
||
or
|
||
```squirrel
|
||
Cb_player_exit_Func.Test <- function (SUser)
|
||
{
|
||
print("退出");
|
||
};
|
||
``` |