Beispiel #1
0
 private void OnTriggerEnter(Collider other)
 {
     //if player walks over health pack, increment player health and play sound
     if (other.gameObject.CompareTag("Player"))
     {
         player.IncrementHealth(25);
         SoundController.GetSound(1).Play();
         Destroy(gameObject);
     }
 }