Ejemplo n.º 1
0
        public override void Draw(TimeSpan delta)
        {
            sysrender.Draw();
            trender.Start(Game.Width, Game.Height);
            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)), Game.Renderer), 5, 5);

            if (textEntry)
            {
                DebugDrawing.DrawShadowedText(trender, font, 16, "Change System (Esc to cancel): " + currentText, 5, 200);
            }
            if (current_msg != null)
            {
                DebugDrawing.DrawShadowedText(trender, font, 16, current_msg, 5, 230, Color4.Red);
            }
            trender.Finish();
        }
Ejemplo n.º 2
0
        //RigidBody debugDrawBody;
        public override void Draw(TimeSpan delta)
        {
            RenderMaterial.VertexLighting = false;
            if (loading)
            {
                loader.Draw(delta);
                return;
            }
            sysrender.Draw();

            sysrender.DebugRenderer.StartFrame(camera, Game.RenderState);
            sysrender.DebugRenderer.Render();
            if ((Thn == null || !Thn.Running)) //HACK: Cutscene also updates the listener so we don't do it if one is running
            {
                Game.Sound.UpdateListener(delta, camera.Position, camera.CameraForward, camera.CameraUp);
            }

            if ((Thn == null || !Thn.Running) && ShowHud)
            {
                ui.RenderWidget();
            }
            Game.Renderer2D.Start(Game.Width, Game.Height);
            if ((Thn == null || !Thn.Running) && ShowHud)
            {
                string sel_obj = "None";
                if (selected != null)
                {
                    if (selected.Name == null)
                    {
                        sel_obj = "unknown object";
                    }
                    else
                    {
                        sel_obj = selected.Name;
                    }
                }
                DebugDrawing.DrawShadowedText(Game.Renderer2D, 16, string.Format(DEMO_TEXT, camera.Position.X, camera.Position.Y, camera.Position.Z, sys.Nickname, sys.Name, DebugDrawing.SizeSuffix(GC.GetTotalMemory(false)), Velocity, sel_obj, control.PlayerPitch, control.PlayerYaw, control.Roll, mouseFlight), 5, 5);
                //pyw.Draw(Game.Renderer2D);
                current_cur.Draw(Game.Renderer2D, Game.Mouse);
            }
            DoFade(delta);
            Game.Renderer2D.Finish();
        }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
        //RigidBody debugDrawBody;
        public override void Draw(TimeSpan delta)
        {
            RenderMaterial.VertexLighting = false;
            if (loading)
            {
                loader.Draw(delta);
                return;
            }
            sysrender.Draw();

            sysrender.DebugRenderer.StartFrame(camera, Game.RenderState);
            sysrender.DebugRenderer.Render();
            if ((Thn == null || !Thn.Running) && ShowHud)
            {
                hud.Draw(delta);
            }
            Game.Renderer2D.Start(Game.Width, Game.Height);
            if ((Thn == null || !Thn.Running) && ShowHud)
            {
                string sel_obj = "None";
                if (selected != null)
                {
                    if (selected.Name == null)
                    {
                        sel_obj = "unknown object";
                    }
                    else
                    {
                        sel_obj = selected.Name;
                    }
                }
                DebugDrawing.DrawShadowedText(Game.Renderer2D, 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(Game.Renderer2D, Game.Mouse);
            }
            DoFade(delta);
            Game.Renderer2D.Finish();
        }