コード例 #1
0
ファイル: GameScreen.cs プロジェクト: ARCHlVE/farseer-physics
        /// <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);
        }
コード例 #2
0
ファイル: Physics.cs プロジェクト: irpx/SpacePenguinShooter
        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);
        }
コード例 #3
0
ファイル: GameScreen.cs プロジェクト: ARCHlVE/farseer-physics
 /// <summary>
 /// Load graphics content for the screen.
 /// </summary>
 public virtual void LoadContent()
 {
     _physicsSimulatorView.LoadContent(ScreenManager.GraphicsDevice, ScreenManager.ContentManager);
 }