protected override void DoSomething()
        {
            if (isPlaying && !repeatable)
            {
                return;
            }

            isPlaying = true;
            _bgmController.PlaySound(audioID);
        }
예제 #2
0
        protected override void Toggled(bool arg0)
        {
            base.Toggled(arg0);

            if (arg0)
            {
                _bgmController.PlaySound();
            }
            else
            {
                _bgmController.StopSound();
            }
        }
예제 #3
0
        private void CheckKeyboard()
        {
            if (Input.GetKeyDown(KeyCode.M))
            {
                ToogleControllers[1] = !ToogleControllers[1];

                if (_bgm.IsPlaying)
                {
                    _bgm.StopSound();
                }
                else
                {
                    _bgm.PlaySound();
                }
            }

            if (Input.GetKeyDown(KeyCode.C))
            {
                ToogleControllers[0] = !ToogleControllers[0];
            }
        }
 protected override void RunEvent()
 {
     _bgmController.PlaySound(audioName);
 }