예제 #1
0
 public void DecrementFuel(float amount)
 {
     _fuelAmount = Mathf.Max(0f, _fuelAmount - amount);
     if (_fuelAmount <= 0f && !_shouldExlode)
     {
         var duration = StartParticle() * 0.5f;
         Destroy(gameObject, duration);
         _shipMovement.DestroyAgent();
         _shouldExlode = true;
     }
 }