示例#1
0
    public void click_Sounds(bool on)
    {
        SOUND.I.Play(DEF.SND.common_click);
        PlayerPrefHelper.SetSoundOn(_tgSounds.isOn);
        SOUND.I.SetSoundOn(_tgSounds.isOn);

        if (_tgSounds.isOn == false)
        {
            SOUND.I.PlayAllStop();
            if (eView.Game == Main.I.CurrentView)
            {
                UI.Game.AddMessage(GameUI.IDs.InGameHandle, "msg", "sound_off");
            }
        }
        else
        {
            if (eView.Game == Main.I.CurrentView)
            {
                UI.Game.AddMessage(GameUI.IDs.InGameHandle, "msg", "sound_on");
            }
            else
            {
                if (!SOUND.I.IsPlay(DEF.SND.lobby_bgm))
                {
                    SOUND.I.Play(DEF.SND.lobby_bgm, true);
                }
            }
        }
    }