Beispiel #1
0
 protected void DestroyAmmunition()
 {
     _damageLowerTimeRemaining.RemoveTimeRemaining();
     _destroyTimeRemaining.RemoveTimeRemaining();
     Destroy(gameObject);
     // Вернуть в пул
 }
Beispiel #2
0
 protected void DestroyAmmunition()
 {
     DisableRigidBody();
     _timeRemaining.RemoveTimeRemaining();
     _timePutToPool.RemoveTimeRemaining();
     ServiceLocator.Resolve <PoolController>().PutToPool(this);
 }
Beispiel #3
0
 public void Execute()
 {
     for (int i = 0; i < _timeRemainings.Count; i++)
     {
         ITimeRemaining obj = _timeRemainings[i];
         obj.CurrentTime -= Time.deltaTime;
         if (obj.CurrentTime <= 0.0f)
         {
             obj.Method?.Invoke();
             if (!obj.IsRepeating)
             {
                 obj.RemoveTimeRemaining();
             }
             else
             {
                 obj.CurrentTime = obj.Time;
             }
         }
     }
 }
Beispiel #4
0
 protected void DestroyAmmunition()
 {
     Destroy(gameObject);
     _timeRemaining.RemoveTimeRemaining();
 }
Beispiel #5
0
 protected void DestroyAmmunition()
 {
     _timeRemaining.RemoveTimeRemaining();
     GetComponent <PoolObject>().ReturnToPool();
 }
Beispiel #6
0
 protected void DestroyAmmunition()
 {
     Destroy(gameObject);
     _timeRemaining.RemoveTimeRemaining();
     //todo вернуть в pool
 }