示例#1
0
        public override void OnEnter()
        {
            MusicController musicController = MusicController.GetInstance();

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

            Continue();
        }
示例#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();
            }
        }