Example #1
0
    //Register, Remove

    public static void RegisterButtonDownFunc(EButtonCode buttonCode, ButtonData.ButtonFunction func)
    {
        ButtonData data = This.GetButtonData(buttonCode);

        if (data != null)
        {
            data.RegisterButtonDownFunc(func);
        }
    }
Example #2
0
    public static void RemoveButtonPressFunc(EButtonCode buttonCode, ButtonData.ButtonFunction func)
    {
        ButtonData data = This.GetButtonData(buttonCode);

        if (data != null)
        {
            data.RemoveButtonPressFunc(func);
        }
    }
Example #3
0
    public static float GetAxisRaw(EButtonCode buttonCode)
    {
        ButtonData data = This.GetButtonData(buttonCode);

        if (data == null)
        {
            Debug.Log("ButtonData == null");
            return(0.0f);
        }

        return(data.GetAxisRaw());
    }
Example #4
0
    public static bool ButtonUp(EButtonCode buttonCode)
    {
        ButtonData data = This.GetButtonData(buttonCode);

        if (data == null)
        {
            Debug.Log("ButtonData == null");
            return(false);
        }

        return(data.GetButtonUp());
    }
Example #5
0
    ButtonData GetButtonData(EButtonCode buttonCode)
    {
        if (_buttonDatas.Count <= 0)
        {
            return(null);
        }

        for (int i = 0; i < _buttonDatas.Count; i++)
        {
            if (_buttonDatas[i]._buttonCode == buttonCode)
            {
                return(_buttonDatas[i]);
            }
        }

        return(null);
    }
Example #6
0
 public static float GetAxisRaw(EButtonCode code)
 {
     return(ButtonManager.GetAxisRaw(code));
 }
Example #7
0
 public static bool ButtonUp(EButtonCode code)
 {
     return(ButtonManager.ButtonUp(code));
 }