Пример #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            _spriteBatch.Begin();
            _ball.Draw(_spriteBatch);
            _left_paddle.Draw(_spriteBatch);
            _right_paddle.Draw(_spriteBatch);
            _spriteBatch.End();

            base.Draw(gameTime);
        }
Пример #2
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);

            spriteBatch.Begin();
            ball.Draw(spriteBatch);
            paddle1.Draw(spriteBatch);
            paddle2.Draw(spriteBatch);
            scoreBoard.Draw(spriteBatch);
            spriteBatch.End();

            base.Draw(gameTime);
        }