예제 #1
0
        protected override void Update(GameTime gameTime)
        {
            var state = Keyboard.GetState();

            base.Update(gameTime);

            foreach (var ball in balls)
            {
                ball.Update(paddle, ref bricks);
            }

            if (state.IsKeyDown(Keys.Left))
            {
                paddle.TryMoveLeft();
            }
            if (state.IsKeyDown(Keys.Right))
            {
                paddle.TryMoveRight();
            }
        }