private IEnumerator KillSound(float time) { yield return(new WaitForSeconds(time)); if (OnFinish != null) { OnFinish.Invoke(this); } if (OnAudioFinish != null) { OnAudioFinish.Invoke(); } Destroy(gameObject); }
public void subscribeOnAudioFinish(OnAudioFinish newCallBackFunction) { callBack = newCallBackFunction; }