Exemplo n.º 1
0
        public void DrawGameInProgress(GameTime gameTime)
        {
            GraphicsDevice.BlendState        = BlendState.Opaque;
            GraphicsDevice.DepthStencilState = DepthStencilState.Default;
            GraphicsDevice.SamplerStates[0]  = SamplerState.LinearWrap;

            //sky.Draw(currentCamera.View, currentCamera.Projection, currentCamera.Position);
            ground.Draw(currentCamera.View, currentCamera.Projection, currentCamera.Position);
            trees1.Draw(currentCamera.View, currentCamera.Projection);
            trees2.Draw(currentCamera.View, currentCamera.Projection, currentCamera.Up, currentCamera.Right);
            clouds.Draw(currentCamera.View, currentCamera.Projection, currentCamera.Up, currentCamera.Right);
            startSign.Draw(currentCamera.View, currentCamera.Projection, currentCamera.Up, Vector3.Right);
            track.Draw(currentCamera.View, currentCamera.Projection);

            foreach (Vehicle model in vehicles)
            {
                if (currentCamera.IsInView(model.BoundingSphere))
                {
                    model.Draw(currentCamera.View, currentCamera.Projection, currentCamera.Position);
                }
            }

            if (isPaused)
            {
                DrawPaused();
            }
        }