IEnumerator GiveOxygen() { yield return new WaitForSeconds(2f); if (isHealing) { dmg.Heal(10); Debug.Log("Uhuk"); } StartCoroutine(GiveOxygen()); }
private void Update() { time_since_damage += Time.deltaTime; if (time_since_damage >= time_delay) { subject.Heal(recovery_per_second * Time.deltaTime); } }
public void Heal() { if (potionCount > 0 && playerHealth.currentHealth < playerHealth.maxHealth) { playerHealth.Heal(10); potionCount -= 1; lm.SetPotion(potionCount); potionText.text = "X " + potionCount; } }
/// <summary> /// /// </summary> /// <param name="collector"></param> public void OnCollect(Collector collector) { Damagable damagable = collector.GetComponent <Damagable>(); if (damagable) { damagable.Heal(1); } Destroy(gameObject); }
protected override bool TryUse(GameObject other) { if (other.tag.Equals("Player")) { Damagable tar = other.GetComponent <Damagable>(); if (tar != null) { tar.Heal(1); return(true); } } return(false); }
public override void ActivateAbility(Vector2 target) { dmg.Heal(healAmount); AudioManager.SharedInstance().PlayRandomHealAudio(); }