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

        addData.name = name;
        addData.id   = id;
        inputDataList.Add(addData);
    }
示例#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);
    }
示例#3
0
 static public bool IsUp(INPUT_ID id)
 {
     return(GetInput(id).state == InputData.STATE.UP);
 }
示例#4
0
 static public bool IsDown(INPUT_ID id)
 {
     return(GetInput(id).state == InputData.STATE.DOWN);
 }
示例#5
0
 static public bool IsPress(INPUT_ID id)
 {
     return(GetInput(id).state == InputData.STATE.PRESS);
 }
示例#6
0
 static public float GetAxisRaw(INPUT_ID id)
 {
     return(Input.GetAxisRaw(GetInput(id).name));
 }