/// <summary> /// Heals the specified health. /// </summary> /// <param name="health">The health.</param> /// <param name="color">The color.</param> public void Heal(int health, Color color) { if (currentHealth <= 0) { return; } if (currentHealth == myProfile.maxHealth) { return; } hpScript.ChangeHP(+health, hpSpawnLoc.position, Vector3.up, 2f, color, "+ " + health.ToString()); currentHealth += health; if (currentHealth > myProfile.maxHealth) { currentHealth = myProfile.maxHealth; } }