2025-11-20更新 by Davi
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Chacter_Exit 回调函数文档
|
||||
|
||||
**回调说明**:
|
||||
`Chacter_Exit`类用于处理游戏中的玩家退出事件。
|
||||
`Chacter_Exit`类用于处理游戏中的玩家退出事件。```选择角色```不会触发该回调
|
||||
|
||||
---
|
||||
|
||||
|
||||
43
CallBack/History_Log/History_Log.md
Normal file
43
CallBack/History_Log/History_Log.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# History_Log 回调函数文档
|
||||
|
||||
**回调说明**:
|
||||
`History_Log`类用于处理游戏中的历史日志
|
||||
|
||||
---
|
||||
|
||||
**注册方法**:
|
||||
- 物品减少:`Cb_History_Log_Func["Item-"] <- function (SUser, Data) {}`
|
||||
- 物品增加:`Cb_History_Log_Func["Item+"] <- function (SUser, Data) {}`
|
||||
|
||||
**例子**:
|
||||
|
||||
```squirrel
|
||||
Cb_History_Log_Func["Item-"] <- function (SUser, Data) {
|
||||
local itemId = Data[15].tointeger();
|
||||
local itemCount = Data[17].tointeger();
|
||||
local reason = Data[18].tointeger();
|
||||
}
|
||||
```
|
||||
or
|
||||
```squirrel
|
||||
Cb_History_Log_Func["Item+"] <- function (SUser, Data) {
|
||||
local itemId = Data[15].tointeger();
|
||||
local itemCount = Data[17].tointeger();
|
||||
local reason = Data[18].tointeger();
|
||||
}
|
||||
```
|
||||
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("上线");
|
||||
};
|
||||
```
|
||||
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