public bool IsLocalKeyReleased(InputState.KeyboardStates keyState)
        {
            InputState currentInputState = m_synchronizedStates[CoreMain.s_localPlayer];
            InputState previousInputState = m_previousSynchronizedStates[CoreMain.s_localPlayer];

            return ((currentInputState.m_inputState & (UInt16)keyState) == 0) && ((previousInputState.m_inputState & (UInt16)keyState) != 0);
        }
        public bool IsKeyReleased(int playerID, InputState.KeyboardStates keyState)
        {
            InputState currentInputState = m_synchronizedStates[playerID];
            InputState previousInputState = m_previousSynchronizedStates[playerID];

            return ((currentInputState.m_inputState & (UInt16)keyState) == 0) && ((previousInputState.m_inputState & (UInt16)keyState) != 0);
        }
 public void Initialize()
 {
     for (int i = 0; i < XNA_GameEngine.CoreMain.MAX_PLAYERS; i++)
     {
         m_synchronizedStates[i] = new InputState();
     }
 }
        public bool IsLocalKeyDown(InputState.KeyboardStates keyState)
        {
            InputState currentInputState = m_synchronizedStates[CoreMain.s_localPlayer];

            return (currentInputState.m_inputState & (UInt16)keyState) != 0;
        }
        public bool IsKeyDown(int playerID, InputState.KeyboardStates keyState)
        {
            InputState currentInputState = m_synchronizedStates[playerID];

            return (currentInputState.m_inputState & (UInt16)keyState) != 0;
        }
Exemplo n.º 6
0
 public LocalInput()
 {
     m_localInputState = new InputState();
 }