Example #1
0
 public bool TakeDamage(int damage)
 {
     _hpTrait.Decrease(damage);
     if (HP == 0)
     {
         return(true);
     }
     return(false);
 }
Example #2
0
 public bool TakeDamage(int amount)
 {
     _hpTrait.Decrease(amount);
     Debug.Log($"{name} took {amount} damage!. Current HP: {HP}");
     if (HP == 0)
     {
         _entityController.DestroyEntity(this);
         return(true);
     }
     return(false);
 }