42 lines
775 B
Markdown
42 lines
775 B
Markdown
|
|
# Player_Chanage_Equ 回调函数文档
|
|||
|
|
|
|||
|
|
**回调说明**:
|
|||
|
|
`Player_Chanage_Equ`类用于处理游戏中的玩家更换装备事件。
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
**注册方法**:
|
|||
|
|
- `Cb_player_chanage_equ_Func.rawset(Key,Function)`
|
|||
|
|
|
|||
|
|
**例子**:
|
|||
|
|
|
|||
|
|
```squirrel
|
|||
|
|
function Test_Function(SUser)
|
|||
|
|
{
|
|||
|
|
print("更换装备");
|
|||
|
|
}
|
|||
|
|
Cb_player_chanage_equ_Func.rawset("Test", Test_Function);
|
|||
|
|
```
|
|||
|
|
or
|
|||
|
|
```squirrel
|
|||
|
|
function Test_Function(SUser)
|
|||
|
|
{
|
|||
|
|
print("更换装备");
|
|||
|
|
}
|
|||
|
|
Cb_player_chanage_equ_Func.Test <- Test_Function;
|
|||
|
|
```
|
|||
|
|
or
|
|||
|
|
```squirrel
|
|||
|
|
function Test_Function(SUser)
|
|||
|
|
{
|
|||
|
|
print("更换装备");
|
|||
|
|
}
|
|||
|
|
Cb_player_chanage_equ_Func["Test"] <- Test_Function;
|
|||
|
|
```
|
|||
|
|
or
|
|||
|
|
```squirrel
|
|||
|
|
Cb_player_chanage_equ_Func.Test <- function (SUser)
|
|||
|
|
{
|
|||
|
|
print("更换装备");
|
|||
|
|
};
|
|||
|
|
```
|