Exemple #1
0
        /// <summary>
        /// Draw the world.
        /// </summary>
        public override void Draw()
        {
            Matrix tform = Camera.Transform;

            // Draw entities.
            SpriteBatchPush();
            DrawChildren(m_spriteBatch);
            SpriteBatchPop();

            if (m_debugView != null)
            {
                // Debug drawing.
                Matrix debugMatrix = Matrix.CreateScale(k_invPhysicsScale) * tform;
                m_debugView.RenderDebugData(ref m_projection, ref debugMatrix);
            }

            // Draw HUD.
            HUD.Draw();

            if (fade)
            {
                FadeOut.fadeOut(0.3f);
            }
            FadeOut.Draw(m_spriteBatch);

            //Draw popup
            if (m_popUp != null)
            {
                m_popUp.Draw();
            }
        }
Exemple #2
0
 protected override void DrawMyself()
 {
     if (!destroyed)
     {
         DefaultDraw();
     }
     else
     {
         destroyEffect.Draw();
         popUp.Draw();
     }
 }