// Called to modify the HP // Can be Decrease or Increase // When HP reaches 0, gameObject is deactivated public virtual void ModifyHealth(int modifyAmt) { // if we are taking damage, then reduce damage with defense if (modifyAmt < 0) { modifyAmt += defense; } hp += modifyAmt; if (IsDead()) { // damage text FloatingTextController.CreateFloatingText("0", transform.position); // Remove all status effects seManager.RemoveAllStatusEffects(); gameObject.SetActive(false); } else { // damage text FloatingTextController.CreateFloatingText(hp.ToString(), transform.position); BlinkAndRed(0.2f); } }