Exemplo n.º 1
0
        public override void OnEnter()
        {
            MusicController musicController = MusicController.GetInstance();

            if (musicController != null)
            {
                musicController.PlaySound(soundClip, volume);
            }

            Continue();
        }
Exemplo n.º 2
0
        public override void OnEnter()
        {
            if (soundClip == null)
            {
                Continue();
                return;
            }

            MusicController musicController = MusicController.GetInstance();

            if (musicController != null)
            {
                musicController.PlaySound(soundClip, volume);
            }

            if (waitUntilFinished)
            {
                Invoke("DoWait", soundClip.length);
            }
            else
            {
                Continue();
            }
        }