Example #1
0
    void AddInputData(INPUT_ID id, string name)
    {
        InputData addData = new InputData();

        addData.name = name;
        addData.id   = id;
        inputDataList.Add(addData);
    }
Example #2
0
    static InputData GetInput(INPUT_ID id)
    {
        for (int i = 0; i < inputDataList.Count; i++)
        {
            if (inputDataList[i].id == id)
            {
                return(inputDataList[i]);
            }
        }

        return(null);
    }
Example #3
0
 static public bool IsUp(INPUT_ID id)
 {
     return(GetInput(id).state == InputData.STATE.UP);
 }
Example #4
0
 static public bool IsDown(INPUT_ID id)
 {
     return(GetInput(id).state == InputData.STATE.DOWN);
 }
Example #5
0
 static public bool IsPress(INPUT_ID id)
 {
     return(GetInput(id).state == InputData.STATE.PRESS);
 }
Example #6
0
 static public float GetAxisRaw(INPUT_ID id)
 {
     return(Input.GetAxisRaw(GetInput(id).name));
 }