36 lines
535 B
Markdown
36 lines
535 B
Markdown
# InputManager::RegisterAxis
|
|
|
|
注册或覆盖一个具名逻辑轴。
|
|
|
|
```cpp
|
|
void RegisterAxis(const InputAxis& axis);
|
|
```
|
|
|
|
## 行为说明
|
|
|
|
当前实现会执行:
|
|
|
|
```cpp
|
|
m_axes[axis.GetName()] = axis;
|
|
```
|
|
|
|
因此:
|
|
|
|
- 同名轴会被覆盖
|
|
- `InputAxis` 会按值复制进管理器
|
|
- 后续再修改原始 `axis` 对象不会影响管理器中的副本
|
|
|
|
## 参数
|
|
|
|
- `axis` - 轴配置对象。
|
|
|
|
## 返回值
|
|
|
|
- 无。
|
|
|
|
## 相关文档
|
|
|
|
- [返回类型总览](InputManager.md)
|
|
- [GetAxis](GetAxis.md)
|
|
- [ClearAxes](ClearAxes.md)
|