dp-s_doc/CallBack/Base_Input/Base_Input.md

42 lines
752 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Base_Input 回调函数文档
**回调说明**
`Base_Input`类用于处理游戏中的普通输入事件。
---
**注册方法**
- `Base_InputFunc_Handle.rawset(Key,Function)`
**例子**
```squirrel
function Test_Function(SUser, CmdString)
{
print(CmdString);
}
Base_InputFunc_Handle.rawset("Test", Test_Function);
```
or
```squirrel
function Test_Function(SUser, CmdString)
{
print(CmdString);
}
Base_InputFunc_Handle.Test <- Test_Function;
```
or
```squirrel
function Test_Function(SUser, CmdString)
{
print(CmdString);
}
Base_InputFunc_Handle["Test"] <- Test_Function;
```
or
```squirrel
Base_InputFunc_Handle.Test <- function (SUser, CmdString)
{
print(CmdString);
};
```