Beispiel #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);

            modelSystem.Draw(gameTime);
            heightmapSystem.Draw(graphics.GraphicsDevice);
            // TODO: Add your drawing code here
            base.Draw(gameTime);
        }
Beispiel #2
0
        protected override void Draw(GameTime gameTime)
        {
            device.Clear(Color.DarkSlateBlue);

            Window.Title = "Controller keys: a,d,s,w, LShift, Space, Arrows, Numpad1, Numpad0. Av: Rasmus Lundquist (S142465) och Henrik Wistbacka(S142066)";

            modelSystem.Draw(effect, gameTime);
            sceneManager.Draw(effect, gameTime);

            CameraComponent camera = ComponentManager.GetComponent <CameraComponent>(CHOPPERID);

            foreach (EffectPass pass in effect.CurrentTechnique.Passes)
            {
                pass.Apply();

                effect.View = camera.viewMatrix;
            }

            base.Draw(gameTime);
        }