Exemple #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (itemPickedUp == false)
     {
         if (other.tag == "Player")
         {
             itemPickedUp = true;
             audioSource.PlayOneShot(pickupClip);
             Debug.Log(playerHealth.CurrentHealth);
             playerHealth.AddHealth(HealthBonus);
             Debug.Log(playerHealth.CurrentHealth);
             StartCoroutine(DestroySequence());
         }
     }
 }