Ejemplo n.º 1
0
 public void Destroy()
 {
     this.ClearOutPool();
     this.pool = null;
     this.createPoolObjectDelegate     = null;
     this.destroyPoolObjectDelegate    = null;
     this.deactivatePoolObjectDelegate = null;
     this.activatePoolObjectDelegate   = null;
 }
Ejemplo n.º 2
0
 public GameObjectPool(GameObjectPool.CreatePoolObjectDelegate createPoolObjectDelegate, GameObjectPool.DestroyPoolObjectDelegate destroyPoolObjectDelegate, GameObjectPool.ActivatePoolObjectDelegate activatePoolObjectDelegate, GameObjectPool.DeactivatePoolObjectDelegate deactivatePoolObjectDelegate)
 {
     this.pool     = new Queue <GameObject>();
     this.Capacity = 0;
     this.createPoolObjectDelegate     = createPoolObjectDelegate;
     this.destroyPoolObjectDelegate    = destroyPoolObjectDelegate;
     this.activatePoolObjectDelegate   = activatePoolObjectDelegate;
     this.deactivatePoolObjectDelegate = deactivatePoolObjectDelegate;
 }
Ejemplo n.º 3
0
 public static GameObjectPool CreateMeshCombinerObjectPool()
 {
     if (MeshCombiner.< > f__mg$cache0 == null)
     {
         MeshCombiner.< > f__mg$cache0 = new GameObjectPool.CreatePoolObjectDelegate(MeshCombiner.CreateMeshCombinerGameObject);
     }
     GameObjectPool.CreatePoolObjectDelegate arg_74_0 = MeshCombiner.< > f__mg$cache0;
     if (MeshCombiner.< > f__mg$cache1 == null)
     {
         MeshCombiner.< > f__mg$cache1 = new GameObjectPool.DestroyPoolObjectDelegate(MeshCombiner.DestroyMeshCombinerGameObject);
     }
     GameObjectPool.DestroyPoolObjectDelegate arg_74_1 = MeshCombiner.< > f__mg$cache1;
     if (MeshCombiner.< > f__mg$cache2 == null)
     {
         MeshCombiner.< > f__mg$cache2 = new GameObjectPool.ActivatePoolObjectDelegate(MeshCombiner.ActivateMeshCombinerGameObject);
     }
     GameObjectPool.ActivatePoolObjectDelegate arg_74_2 = MeshCombiner.< > f__mg$cache2;
     if (MeshCombiner.< > f__mg$cache3 == null)
     {
         MeshCombiner.< > f__mg$cache3 = new GameObjectPool.DeactivatePoolObjectDelegate(MeshCombiner.DeactivateMeshCombinerGameObject);
     }
     return(new GameObjectPool(arg_74_0, arg_74_1, arg_74_2, MeshCombiner.< > f__mg$cache3));
 }