コード例 #1
0
        public GameScene(Vector2 sceneSize, Vector2 regionSize)
        {
            MatrixRegion         = new MatrixRegion <IGameObject>(sceneSize, regionSize);
            GameObjectCollection = new GameObjectCollection();
            GamePlayerSpawnData  = new GamePlayerSpawnData();

            var lowerBound = new Vector2(-100, -100);
            var upperBound = new Vector2(100, 100);
            var gravity    = new Vector2(0, 0 /* -9.81f */);

            PhysicsWorldManager = new PhysicsWorldManager(lowerBound, upperBound, gravity);
            PhysicsExecutor     = new PhysicsExecutor(OnUpdateBodies, OnSimulatePhysics);
        }
コード例 #2
0
 public void Dispose()
 {
     MatrixRegion?.Dispose();
     PhysicsExecutor?.Dispose();
     PhysicsWorldManager?.Dispose();
 }