Esempio n. 1
0
        private IEnumerator KillSound(float time)
        {
            yield return(new WaitForSeconds(time));

            if (OnFinish != null)
            {
                OnFinish.Invoke(this);
            }

            if (OnAudioFinish != null)
            {
                OnAudioFinish.Invoke();
            }

            Destroy(gameObject);
        }
Esempio n. 2
0
 public void subscribeOnAudioFinish(OnAudioFinish newCallBackFunction)
 {
     callBack = newCallBackFunction;
 }