示例#1
0
        private void OnToggleValueChanged(bool isOn)
        {
            switch (audioType)
            {
            case AudioType.Music:
                AudioClipPlayer.MuteMusic(isOn);
                break;

            case AudioType.Sfx:
                AudioClipPlayer.MuteSfx(isOn);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            AudioClipPlayer.PlayButton();
            PlayerSettings.Save();
        }
示例#2
0
 private static void OnClick()
 {
     AudioClipPlayer.PlayButton();
 }