Esempio n. 1
0
 public override void Draw(TimeSpan delta)
 {
     if (scene != null)
     {
         scene.Draw();
     }
     hud.Draw();
     Game.Renderer2D.Start(Game.Width, Game.Height);
     cursor.Draw(Game.Renderer2D, Game.Mouse);
     Game.Renderer2D.Finish();
 }
Esempio n. 2
0
        //RigidBody debugDrawBody;
        public override void Draw(TimeSpan delta)
        {
            sysrender.Draw();
            //debugphysics.StartFrame(camera, Game.RenderState);

            /*foreach (var body in world.Physics.RigidBodies)
             *          {
             *                  var rb = (RigidBody)body;
             *                  if (rb.EnableDebugDraw) rb.DebugDraw(debugphysics);
             *          }
             *
             *          if (debugDrawBody != null)
             *          {
             *                  debugDrawBody.DebugDraw(debugphysics);
             *          }*/
            sysrender.DebugRenderer.StartFrame(camera, Game.RenderState);
            //world.Physics.DrawWorld();
            sysrender.DebugRenderer.Render();
            //debugphysics.Render();
            hud.Draw();
            trender.Start(Game.Width, Game.Height);
            string sel_obj = "None";

            if (selected != null)
            {
                if (selected.Name == null)
                {
                    sel_obj = "unknown object";
                }
                else
                {
                    sel_obj = selected.Name;
                }
            }
            DebugDrawing.DrawShadowedText(trender, font, 16, string.Format(DEMO_TEXT, camera.Position.X, camera.Position.Y, camera.Position.Z, sys.Id, sys.Name, DebugDrawing.SizeSuffix(GC.GetTotalMemory(false)), Velocity, sel_obj, moffset.X, moffset.Y, mouseFlight), 5, 5);
            current_cur.Draw(trender, Game.Mouse);
            trender.Finish();
        }