void AddInputData(INPUT_ID id, string name) { InputData addData = new InputData(); addData.name = name; addData.id = id; inputDataList.Add(addData); }
static InputData GetInput(INPUT_ID id) { for (int i = 0; i < inputDataList.Count; i++) { if (inputDataList[i].id == id) { return(inputDataList[i]); } } return(null); }
static public bool IsUp(INPUT_ID id) { return(GetInput(id).state == InputData.STATE.UP); }
static public bool IsDown(INPUT_ID id) { return(GetInput(id).state == InputData.STATE.DOWN); }
static public bool IsPress(INPUT_ID id) { return(GetInput(id).state == InputData.STATE.PRESS); }
static public float GetAxisRaw(INPUT_ID id) { return(Input.GetAxisRaw(GetInput(id).name)); }