Пример #1
0
 public static string GetAxisLabel(E_JoystickAxis axis)
 {
     if (axis > E_JoystickAxis.NONE && axis < E_JoystickAxis.COUNT)
     {
         return(JoyAxis[(int)axis].name);
     }
     else
     {
         return("");
     }
 }
Пример #2
0
    void ChecDupliciteAxis(E_JoystickAxis testAxis, int btnIndex)
    {
        for (int m = 0; m < s_GActions.Length; m++)
        {
            PlayerControlsGamepad.E_Input actionID = s_GActions[m].actionID;
            // check if we allready have testkey in our list and make sure we dont compare with itself
            JoyInput button = GamepadInputManager.Instance.GetActionButton(actionID);
            if (testAxis == button.joyAxis && m != btnIndex)
            {
                // reset the double key
                GamepadInputManager.Instance.SetActionButton(actionID, new JoyInput(KeyCode.None, E_JoystickAxis.NONE));

                //update label
                GUIBase_Button updateBtn = m_ActionButtons[m];
                UpdateButtonLabel(updateBtn.Widget);
            }
        }
    }
Пример #3
0
 public JoyInput(KeyCode _key, E_JoystickAxis _joyAxis)
 {
     key     = _key;
     joyAxis = _joyAxis;
 }