// main input public void SetButton(ePlayerButton button, bool down) { if (m_inputSystem != null) { m_inputSystem.SetButton(button, down); } }
// main controller public void SetButton(ePlayerButton button, bool down) { if (down) { MainInput.SetButtonDown(button); } else { MainInput.SetButtonUp(button); } }
public void SetButtonDown(ePlayerButton button) { stuckButtonInputFlags |= (uint)button; }
public void SetButtonDoubleClick(ePlayerButton button) { buttonDoubleClickFlag = (uint)button; }
public bool GetButtonDoubleClick(ePlayerButton button) { return(buttonDoubleClickFlag == (uint)button); }
public bool GetButtonUp(ePlayerButton button) { return((GetInputUp() & (uint)button) != 0); }
public bool GetButtonDown(ePlayerButton button) { return((GetInputDown() & (uint)button) != 0); }
public void SetButtonUp(ePlayerButton button) { stuckButtonInputFlags -= (stuckButtonInputFlags & (uint)button); }
public bool GetButtonUp(ePlayerButton button) { uint input = GetInputUp(); return((input & (uint)button) != 0); }
public ButtonEvent(ePlayerButtonEnum btn) { m_buttonEnum = btn; m_button = (ePlayerButton)InputSystem.GetPlayerButton((ePlayerButtonEnum)btn); }
//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); }