public override bool GetCommand_Trigger(Cmd_Trigger cmd) { InputControl input = _cmdTriggerToInputControl[cmd]; // Buttons foreach (var btn in input.buttons) { if (XboxGamepadInput.GetButtonDown(btn)) // TODO: what if button up { return(true); } } // Axes /*foreach (var axis in input.axes) // TODO: store prev axis value to properly determine "trigger" vs "bool" behavior * { * if (XboxGamepadInput.GetAxisRaw(axis) > 0.5f) // TODO: what if negative axis value? * { * return true; * } * }*/ return(false); }
public override bool GetCommand_Trigger(Cmd_Trigger cmd) { Button[] buttons = _cmdTriggerToButton[cmd]; foreach (var btn in buttons) { string btnName = btn.ToString(); if (string.IsNullOrEmpty(btnName)) { continue; } if (Input.GetButtonDown(btnName)) // TODO: what if button up { return(true); } } return(false); }
public virtual bool GetCommand_Trigger(Cmd_Trigger cmd) { throw new NotImplementedException(); }