Ejemplo n.º 1
0
        public virtual void Draw()
        {
            if (CurrentBehaviourIndex < Behaviours.Count)
            {
                Behaviours[CurrentBehaviourIndex].Draw(Game.SpriteBatch);
            }

            CurrentAnimator.Draw(Game.SpriteBatch);

            if (CurrentBehaviourIndex < Behaviours.Count)
            {
                Behaviours[CurrentBehaviourIndex].DrawAfter(Game.SpriteBatch);
            }

            if (PhysicsEnabled && GameConfig.DebugPhysics)
            {
                var view       = Game.Camera.GetViewMatrix();
                var projection = Matrix.CreateOrthographicOffCenter(
                    0f,
                    ConvertUnits.ToSimUnits(Game.GraphicsDevice.Viewport.Width),
                    ConvertUnits.ToSimUnits(Game.GraphicsDevice.Viewport.Height), 0f, 0f, 1f
                    );

                _debugView.Draw(ref projection, ref view);
            }
        }
Ejemplo n.º 2
0
        protected override void Draw(GameTime gameTime)
        {
            debugView.Draw(gameTime);

            fpsHelper.DrawFPS();

            base.Draw(gameTime);
        }
Ejemplo n.º 3
0
        public override void Draw()
        {
            base.Draw();

            if (GameConfig.DebugPhysics)
            {
                var view       = Game.Camera.GetViewMatrix();
                var projection = Matrix.CreateOrthographicOffCenter(
                    0f,
                    ConvertUnits.ToSimUnits(Game.GraphicsDevice.Viewport.Width),
                    ConvertUnits.ToSimUnits(Game.GraphicsDevice.Viewport.Height), 0f, 0f, 1f
                    );

                _debugView.Draw(ref projection, ref view);
            }
        }