Exemple #1
0
        protected override void Toggled(bool arg0)
        {
            base.Toggled(arg0);

            if (arg0)
            {
                _bgmController.PlaySound();
            }
            else
            {
                _bgmController.StopSound();
            }
        }
Exemple #2
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 DoSomething()
 {
     _bgmController.StopSound();
 }