Beispiel #1
0
 public TargetReticlePool(TargetReticlePool.CreatePoolObjectDelegate createPoolObjectDelegate, TargetReticlePool.DestroyPoolObjectDelegate destroyPoolObjectDelegate, TargetReticlePool.ActivatePoolObjectDelegate activatePoolObjectDelegate, TargetReticlePool.DeactivatePoolObjectDelegate deactivatePoolObjectDelegate)
 {
     this.pool     = new Queue <TargetReticle>();
     this.Capacity = 0;
     this.createPoolObjectDelegate     = createPoolObjectDelegate;
     this.destroyPoolObjectDelegate    = destroyPoolObjectDelegate;
     this.activatePoolObjectDelegate   = activatePoolObjectDelegate;
     this.deactivatePoolObjectDelegate = deactivatePoolObjectDelegate;
 }
Beispiel #2
0
 public void Destroy()
 {
     this.ClearOutPool();
     this.pool = null;
     this.createPoolObjectDelegate     = null;
     this.destroyPoolObjectDelegate    = null;
     this.deactivatePoolObjectDelegate = null;
     this.activatePoolObjectDelegate   = null;
 }
Beispiel #3
0
 public TargetIdentifier()
 {
     if (TargetIdentifier.< > f__mg$cache0 == null)
     {
         TargetIdentifier.< > f__mg$cache0 = new TargetReticlePool.CreatePoolObjectDelegate(TargetReticle.CreateTargetReticlePoolObject);
     }
     TargetReticlePool.CreatePoolObjectDelegate   arg_3D_1 = TargetIdentifier.< > f__mg$cache0;
     TargetReticlePool.DestroyPoolObjectDelegate  arg_3D_2 = null;
     TargetReticlePool.ActivatePoolObjectDelegate arg_3D_3 = null;
     if (TargetIdentifier.< > f__mg$cache1 == null)
     {
         TargetIdentifier.< > f__mg$cache1 = new TargetReticlePool.DeactivatePoolObjectDelegate(TargetReticle.DeactivateTargetReticlePoolObject);
     }
     base..ctor(arg_3D_1, arg_3D_2, arg_3D_3, TargetIdentifier.< > f__mg$cache1);
     Service.EventManager.RegisterObserver(this, EventId.TroopAcquiredFirstTarget, EventPriority.Default);
     Service.EventManager.RegisterObserver(this, EventId.SpecialAttackDeployed, EventPriority.Default);
     base.EnsurePoolCapacity(10);
 }