Example #1
0
 // main input
 public void SetButton(ePlayerButton button, bool down)
 {
     if (m_inputSystem != null)
     {
         m_inputSystem.SetButton(button, down);
     }
 }
Example #2
0
 // main controller
 public void SetButton(ePlayerButton button, bool down)
 {
     if (down)
     {
         MainInput.SetButtonDown(button);
     }
     else
     {
         MainInput.SetButtonUp(button);
     }
 }
Example #3
0
 public void SetButtonDown(ePlayerButton button)
 {
     stuckButtonInputFlags |= (uint)button;
 }
Example #4
0
 public void SetButtonDoubleClick(ePlayerButton button)
 {
     buttonDoubleClickFlag = (uint)button;
 }
Example #5
0
 public bool GetButtonDoubleClick(ePlayerButton button)
 {
     return(buttonDoubleClickFlag == (uint)button);
 }
Example #6
0
 public bool GetButtonUp(ePlayerButton button)
 {
     return((GetInputUp() & (uint)button) != 0);
 }
Example #7
0
 public bool GetButtonDown(ePlayerButton button)
 {
     return((GetInputDown() & (uint)button) != 0);
 }
Example #8
0
 public void SetButtonUp(ePlayerButton button)
 {
     stuckButtonInputFlags -= (stuckButtonInputFlags & (uint)button);
 }
Example #9
0
        public bool GetButtonUp(ePlayerButton button)
        {
            uint input = GetInputUp();

            return((input & (uint)button) != 0);
        }
Example #10
0
 public ButtonEvent(ePlayerButtonEnum btn)
 {
     m_buttonEnum = btn;
     m_button     = (ePlayerButton)InputSystem.GetPlayerButton((ePlayerButtonEnum)btn);
 }
Example #11
0
        //protected void SetDirection(eMoveDirection eType, bool down)
        //{
        //    if (down)
        //    {
        //        m_moveDirection = ((uint)eType | m_moveDirection);
        //    }
        //    else
        //    {
        //        m_moveDirection = (~(uint)eType & m_moveDirection);
        //    }
        //    m_moveDir = LEMath.ToByteDir(m_axisInput);
        //}

        /*
         * private void UpdateInput()
         * {
         *  if (TimeManager.Paused == false)
         *  {
         *      uint input = GetCharacterInput();
         *      if ((TimeManager.frameCount - m_lastInputActionTimestamp) > 1
         *          && (input & InputSystem.ATTACK_BUTTONS) != 0)
         *      {
         *          m_lastInputActionTimestamp = TimeManager.frameCount;
         *          m_lastInput = input;
         *      }
         *      else if (input != m_lastInput)
         *      {
         *          m_lastInputActionTimestamp = 0;
         *      }
         *  }
         * }
         */

        public static bool IsButton(uint input, ePlayerButton ePlayerButton)
        {
            return(((ePlayerButton)input & ePlayerButton) == ePlayerButton);
        }