private void OnTriggerEnter2D(Collider2D collision) { Debug.Log("picked up Key"); if (collision.tag == "Player") { itemBag.PickUpKey(); //Play sound here Destroy(gameObject); } }
private void OnTriggerEnter2D(Collider2D collision) { Debug.Log("picked up Key"); if (collision.tag == "Player") { itemBag.PickUpKey(); //Play sound here Destroy(gameObject); } }