/// <summary>
 /// 开关切换
 /// </summary>
 /// <param name="view"></param>
 /// <param name="status"></param>
 public void onSwitchChange(GameObject view, int status)
 {
     SoundUtil.playSoundClip(AudioButtonOnClickEnum.btn_sound_3);
     if (view == mMusicSelectionSwith.gameObject)
     {
         CommonConfigure.IsOpenBGM = (EnabledEnum)Enum.ToObject(typeof(EnabledEnum), status);
         if ((int)CommonConfigure.IsOpenBGM == 0)
         {
             SoundUtil.stopBGMClip();
         }
         else
         {
             SoundUtil.playBGMClip();
         }
     }
     else if (view == mSoundSelectionSwitch.gameObject)
     {
         CommonConfigure.IsOpenSound = (EnabledEnum)Enum.ToObject(typeof(EnabledEnum), status);
     }
     else if (view == mTimeUISelectionSwith.gameObject)
     {
         CommonConfigure.IsOpenTimeUI = (EnabledEnum)Enum.ToObject(typeof(EnabledEnum), status);
     }
     CommonConfigure.saveData();
     CommonConfigure.refreshData();
     CommonData.refreshData();
 }
Beispiel #2
0
    /// <summary>
    /// 使用装备
    /// </summary>
    /// <param name="content"></param>
    /// <param name="data"></param>
    /// <param name="oldObj"></param>
    private void useEquip(Transform content, EquipInfoBean data, GameObject oldObj)
    {
        GameConfigureBean configureBean = DataStorageManage.getGameConfigureDSHandle().getData(0);

        if (data.equipType == (int)EquipTypeEnum.PuzzlesShape)
        {
            configureBean.puzzlesShape = (int)data.equipTypeId;
        }
        else if (data.equipType == (int)EquipTypeEnum.BorderShape)
        {
            configureBean.borderShape = (int)data.equipTypeId;
        }
        else if (data.equipType == (int)EquipTypeEnum.BorderColor)
        {
            configureBean.borderColor = (int)data.equipTypeId;
        }
        else if (data.equipType == (int)EquipTypeEnum.Background)
        {
            configureBean.background = (int)data.equipTypeId;
        }
        DataStorageManage.getGameConfigureDSHandle().saveData(configureBean);
        CommonConfigure.refreshData();

        refreshData(content);
    }
    /// <summary>
    /// 语言选择
    /// </summary>
    /// <param name="position"></param>
    private void languageSelection(int position)
    {
        SoundUtil.playSoundClip(AudioButtonOnClickEnum.btn_sound_3);
        GameConfigureBean configure = DataStorageManage.getGameConfigureDSHandle().getData(0);

        configure.gameLanguage = position;
        DataStorageManage.getGameConfigureDSHandle().saveData(configure);
        CommonConfigure.refreshData();
        CommonData.refreshData();
        mUIMasterControl.refreshAllUI();
    }