コード例 #1
0
ファイル: Game1.cs プロジェクト: elkorn/Tanks3DFPP
        /// <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)
        {
            if (menu.Enabled)
            {
                menu.Draw();
            }
            else
            {
                GraphicsDevice.Clear(Color.Black);
                sky.Draw(camera);
                GraphicsDevice.BlendState        = BlendState.Opaque;
                GraphicsDevice.DepthStencilState = DepthStencilState.Default;
                GraphicsDevice.SamplerStates[0]  = SamplerState.LinearWrap;
                GraphicsDevice.RasterizerState   = rs;
                terrain.Draw(gameTime);
                tankController.Draw(camera.View, projection);
                if (debug)
                {
                    this.DrawDebugInfo();
                }
            }

            base.Draw(gameTime);
        }