private IEnumerator PlaySound() { audioSource.Play(); while (audioSource.isPlaying) { yield return(new WaitForEndOfFrame()); } gemCounter.CountGem(); Destroy(this.gameObject); }