Esempio n. 1
0
        protected override void Draw(GameTime gameTime)
        {
            if (tryb != 5 && (tryb != 3 || !tryb3.fog))
            {
                GraphicsDevice.Clear(Color.Black);
            }
            else if (tryb == 3 && tryb3.fog)
            {
                GraphicsDevice.Clear(Color.Gray);
            }
            else
            {
                GraphicsDevice.Clear(Color.LightGray * 1.08f);
            }

            GraphicsDevice.BlendState        = BlendState.Opaque;
            GraphicsDevice.DepthStencilState = DepthStencilState.Default;

            //
            sw.Start();

            if (tryb == 1)
            {
                tryb1.Draw(gameTime);
            }
            else if (tryb == 2)
            {
                tryb2.Draw(gameTime);
            }
            else if (tryb == 3)
            {
                if (!tryb3Choose)
                {
                    tryb3.Draw(gameTime);
                }
                else
                {
                    tryb3.Draw2(gameTime);
                }
            }
            else if (tryb == 4)
            {
                tryb4.Draw(gameTime);
            }
            else if (tryb == 5)
            {
                tryb5.Draw(gameTime, FPS.fpsArray, FPS.fpsArray1, FPS.fpsArray2, FPS.fpsArray3, FPS.fpsArray4, FPS.fpsArray5);
            }

            int periodTime = (int)sw.Elapsed.Milliseconds;

            sw.Stop();
            sw.Reset();

            if (!timePause)
            {
                TIME.countTIME(gameTime.TotalGameTime.Seconds, periodTime, tryb);
            }

            base.Draw(gameTime);
        }