Exemple #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         healthBar.AdjustCurrentHealth(damage);
         StartCoroutine(HurtDelay());
         Debug.Log("You took damage");
         Debug.Log("This is a " + this.gameObject.tag);
     }
 }
Exemple #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         healthBar.AdjustCurrentHealth(health);
         milesScript.MilesDrinkHealth();
         //Debug.Log("You gained health");
         //Debug.Log("This is a " + this.gameObject.tag);
         Destroy(gameObject);
     }
 }