public float GetTrigger(ControllerInputWrapper.Triggers trigger, PlayerID id, bool isRaw = false) { if (!playerControls.ContainsKey(id)) { return(0); } if (playerControls[id] == null) { return(0); } return(playerControls[id].GetTrigger(trigger, isRaw)); }
public static float GetTrigger(ControllerInputWrapper.Triggers trigger, int joyNum, bool isRaw = false) { joyNum--; if (joyNum < 0) { if (joyNum == -1) { return(keyboardWrapper.GetTrigger(trigger, joyNum, isRaw)); } return(0); } if (playerControls[joyNum] == null) { return(0); } //Debug.Log (trigger); return(playerControls[joyNum].GetTrigger(trigger, joyNum + 1, isRaw)); }