42 lines
734 B
Markdown
42 lines
734 B
Markdown
# GM_Input 回调函数文档
|
||
|
||
**回调说明**:
|
||
`GM_Input`类用于处理游戏中的GM输入事件。
|
||
|
||
---
|
||
|
||
**注册方法**:
|
||
- `Gm_InputFunc_Handle.rawset(Key,Function)`
|
||
|
||
**例子**:
|
||
|
||
```squirrel
|
||
function Test_Function(SUser, CmdString)
|
||
{
|
||
print(CmdString);
|
||
}
|
||
Gm_InputFunc_Handle.rawset("Test", Test_Function);
|
||
```
|
||
or
|
||
```squirrel
|
||
function Test_Function(SUser, CmdString)
|
||
{
|
||
print(CmdString);
|
||
}
|
||
Gm_InputFunc_Handle.Test <- Test_Function;
|
||
```
|
||
or
|
||
```squirrel
|
||
function Test_Function(SUser, CmdString)
|
||
{
|
||
print(CmdString);
|
||
}
|
||
Gm_InputFunc_Handle["Test"] <- Test_Function;
|
||
```
|
||
or
|
||
```squirrel
|
||
Gm_InputFunc_Handle.Test <- function (SUser, CmdString)
|
||
{
|
||
print(CmdString);
|
||
};
|
||
``` |