Beispiel #1
0
        void ResponseToInput()
        {
            if (Keyboard.GetState().IsKeyDown(Keys.Q))
            {
                leftPaddle.MoveUP();
            }

            if (Keyboard.GetState().IsKeyDown(Keys.A))
            {
                leftPaddle.MoveDown(GraphicsDevice.Viewport.Height);
            }

            if (Keyboard.GetState().IsKeyDown(Keys.P))
            {
                rightPaddle.MoveUP();
            }

            if (Keyboard.GetState().IsKeyDown(Keys.L))
            {
                rightPaddle.MoveDown(GraphicsDevice.Viewport.Height);
            }
        }