public void OnGoal() { var soundPlayer = GetComponent <PlaysSoundOnRequest>(); if (soundPlayer != null) { soundPlayer.PlayOneShot(0); } if (prize != null && hoopsGoal <= hoopIndex + 1) { prize.SetActive(true); prize.transform.parent = transform.parent; prize = null; if (targetBall != null) { targetBall.Drop(visiblePointForBall.position); } if (GetComponent <PlaysAudioRemarkOnRadio>() != null) { GetComponent <PlaysAudioRemarkOnRadio>().Play(0); } } NextHoop(); }