Ejemplo n.º 1
0
 public override void OnPostRender()
 {
     Context.Instance.SetWireframe(true);
     m_CollisionBoxRenderer.Begin();
     for (int i = 0; i < m_RenderableEntities.GetEntities().Length; i++)
     {
         GameEntity entity = m_RenderableEntities.GetEntities()[i];
         if (entity.hasCollision)
         {
             m_CollisionBoxRenderer.FillPolygon(entity.collision.CollisionBounds.Vertices, 0xff00ffff);
         }
     }
     m_CollisionBoxRenderer.Present();
     Context.Instance.SetWireframe(false);
 }
Ejemplo n.º 2
0
        public void _Render()
        {
            OnPreRender();

            m_Renderer2D.Begin();

            OnEarlyRender(m_Renderer2D);
            foreach (GameEntity entity in m_RenderableEntities.GetEntities())
            {
                entity.renderable.Render(entity.position, m_Renderer2D);
            }

            OnLateRender(m_Renderer2D);

            m_Renderer2D.Present();

            OnPostRender();
        }