public override void LoadContent()
        {
            if (World == null)
            {
                World = new World(Vector2.Zero);
            }
            else
            {
                World.Clear();
            }

            if (DebugView == null)
            {
                DebugView = new DebugView.DebugView(World);
                DebugView.DefaultShapeColor  = Color.White;
                DebugView.SleepingShapeColor = Color.LightGray;
                DebugView.LoadContent(Framework.GraphicsDevice, Framework.Content);
            }

            DebugView.Flags = _flags;
            _flagsChanged   = false;

            if (Camera == null)
            {
                Camera = new Camera2D(Framework.GraphicsDevice);
            }
            else
            {
                Camera.ResetCamera();
            }

            base.LoadContent();
        }
 protected PhysicsDemoScreen()
 {
     TransitionOnTime    = TimeSpan.FromSeconds(0.75);
     TransitionOffTime   = TimeSpan.FromSeconds(0.75);
     HasCursor           = true;
     EnableCameraControl = true;
     _userAgent          = null;
     World       = null;
     Camera      = null;
     DebugView   = null;
     RenderDebug = true;
 }
Ejemplo n.º 3
0
 public virtual void Initialize()
 {
     DebugView = new DebugView.DebugView(World);
     DebugView.LoadContent(GameInstance.GraphicsDevice, GameInstance.Content);
 }