/// <summary> /// Load graphics content for the screen. /// </summary> public virtual void LoadContent() { _lineBrush.Load(ScreenManager.GraphicsDevice); _physicsSimulatorView.LoadContent(ScreenManager.GraphicsDevice, ScreenManager.ContentManager); int borderWidth = (int)(ScreenManager.ScreenHeight * .05f); _border = new Border(ScreenManager.ScreenWidth, ScreenManager.ScreenHeight, borderWidth, ScreenManager.ScreenCenter); _border.Load(ScreenManager.GraphicsDevice, PhysicsSimulator); }
public Physics(Vector2 newGravity) { if (Instance != null) throw new Exception("Physics engine instance doubled!"); Physics.Instance = this; this.setGravity(newGravity); BiasFactor = 0.01f; //AllowedPenetration = 0.01f; this.Iterations = 50; this.MaxContactsToResolve = 3; physicsSimulatorView = new DemoBaseXNA.PhysicsSimulatorView(this); // physicsSimulatorView.EnableEdgeView = false; physicsSimulatorView.LoadContent(Game1.Instance.GraphicsDevice, Game1.Instance.Content); }
/// <summary> /// Load graphics content for the screen. /// </summary> public virtual void LoadContent() { _physicsSimulatorView.LoadContent(ScreenManager.GraphicsDevice, ScreenManager.ContentManager); }