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

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

            Continue();
        }
コード例 #2
0
ファイル: PlaySound.cs プロジェクト: Cyberbanan/fungus
        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();
            }
        }