コード例 #1
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.CornflowerBlue);

            // Somewhere in your LoadContent() method:
            var pixel = new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color);

            pixel.SetData(new[] { Color.White }); // so that we can draw whatever color we want on top of it

            map.Draw(spriteBatch);

            player.Draw(spriteBatch);

            base.Draw(gameTime);
        }