private void Pickup(Health health, GameObject healFX, float percentToRestore, bool respawn, float time) { Instantiate(healFX, health.transform); health.Heal(percentToRestore); base.Pickup(respawn, time); }
private void DealMeleeDamage(Health targetHealth) { if (currentWeapon.GetDamage() > 0) { bool died = targetHealth.Damage(currentWeapon.GetDamage()); if (died) { target = null; } } if (currentWeapon.GetDamage() < 0) { targetHealth.Heal(-currentWeapon.GetDamage()); } }