Raphafrei

Collider Sound

Dec 15th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.21 KB | None | 0 0
  1.     void OnTriggerEnter(Collider other) {
  2.         if(other.gameObject.tag == "Player") {
  3.             audioSource.clip = pickup;
  4.             audioSource.Play();
  5.             Destroy(this.gameObject);
  6.         }
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment