2025-11-20更新 by Davi
This commit is contained in:
41
CallBack/Leave_Game_World/Leave_Game_World.md
Normal file
41
CallBack/Leave_Game_World/Leave_Game_World.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Reach_Game_World 回调函数文档
|
||||
|
||||
**回调说明**:
|
||||
`Cb_Leave_Game_World`类用于处理游戏中的角色下线事件。
|
||||
|
||||
---
|
||||
|
||||
**注册方法**:
|
||||
- `Cb_Leave_Game_World_Enter_Func.rawset(Key,Function)`
|
||||
|
||||
**例子**:
|
||||
|
||||
```squirrel
|
||||
Cb_Leave_Game_World_Enter_Func.test <- function (args) {
|
||||
local SUser = User(args[1]);
|
||||
local characNo = SUser.GetCID();
|
||||
};
|
||||
```
|
||||
or
|
||||
```squirrel
|
||||
function Test_Function(SUser)
|
||||
{
|
||||
print("上线");
|
||||
}
|
||||
Cb_reach_game_world_Func.Test <- Test_Function;
|
||||
```
|
||||
or
|
||||
```squirrel
|
||||
function Test_Function(SUser)
|
||||
{
|
||||
print("上线");
|
||||
}
|
||||
Cb_reach_game_world_Func["Test"] <- Test_Function;
|
||||
```
|
||||
or
|
||||
```squirrel
|
||||
Cb_reach_game_world_Func.Test <- function (SUser)
|
||||
{
|
||||
print("上线");
|
||||
};
|
||||
```
|
||||
Reference in New Issue
Block a user