717 B
717 B
InputAxis::GetValue
读取 InputAxis 对象内部保存的数值。
float GetValue() const;
行为说明
这个值只是 InputAxis 对象自己的成员 m_value。当前 InputManager::GetAxis 和 GetAxisRaw 不会读取它,而是根据按键状态重新计算轴值。
因此,它更像是一个通用配置/缓存字段,而不是 InputManager 的真实运行时输出。
返回值
float- 当前对象内部保存的数值。
示例
XCEngine::Input::InputAxis axis;
axis.SetValue(0.5f);
float value = axis.GetValue();