Exemple #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);
            }
        }
Exemple #2
0
        public virtual void Draw()
        {
            CurrentAnimator.Draw(Game.SpriteBatch);

            if (CurrentBehaviourIndex < Behaviours.Count)
            {
                Behaviours[CurrentBehaviourIndex].Draw(Game.SpriteBatch);
            }
        }
Exemple #3
0
 public void Draw(SpriteBatch spriteBatch)
 {
     _animator.Draw(spriteBatch);
 }