Exemple #1
0
 IEnumerator GiveOxygen() {
     yield return new WaitForSeconds(2f);
     if (isHealing) {
         dmg.Heal(10);
         Debug.Log("Uhuk");
     }
     StartCoroutine(GiveOxygen());
 }
Exemple #2
0
    private void Update()
    {
        time_since_damage += Time.deltaTime;

        if (time_since_damage >= time_delay)
        {
            subject.Heal(recovery_per_second * Time.deltaTime);
        }
    }
Exemple #3
0
 public void Heal()
 {
     if (potionCount > 0 && playerHealth.currentHealth < playerHealth.maxHealth)
     {
         playerHealth.Heal(10);
         potionCount -= 1;
         lm.SetPotion(potionCount);
         potionText.text = "X " + potionCount;
     }
 }
Exemple #4
0
        /// <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);
 }
Exemple #6
0
 public override void ActivateAbility(Vector2 target)
 {
     dmg.Heal(healAmount);
     AudioManager.SharedInstance().PlayRandomHealAudio();
 }