void OnCollisionEnter(Collision collision) { if (dropped && collision.gameObject.tag == "Untagged") { audioSource.PlayOneShot(AudioList.Get("item_dropped")); dropped = false; } if (collision.gameObject.tag == "Respawn") { //Controller player = FindObjectOfType<Controller>(); //player.Pick(this); } }
public void OnTaken() { gameObject.layer = LayerMask.NameToLayer("Picked"); audioSource.PlayOneShot(AudioList.Get("item_taken")); rigidbody.isKinematic = true; }