Esempio n. 1
0
 public int UF_GetIntValue(string key, int defaultValue = 0)
 {
     if (m_HashData.ContainsKey(key))
     {
         return(GHelper.UF_ParseInt(m_HashData[key]));
     }
     else
     {
         return(defaultValue);
     }
 }
Esempio n. 2
0
        //载入全局配置
        internal static IEnumerator UF_InitGameConfigs()
        {
            GlobalConfig = new ConfigFile();
            UserConfig   = new ConfigFile(GlobalPath.ResPersistentPath + "user_setting.ini");

            yield return(GameMain.Instance.StartCoroutine(UF_IELoadSettingsFile(GlobalConfig, "settings.ini")));

            //app打包配置
            yield return(GameMain.Instance.StartCoroutine(UF_IELoadSettingsFile(GlobalConfig, "appsettings.ini")));

            //渠道配置
            yield return(GameMain.Instance.StartCoroutine(UF_IELoadSettingsFile(GlobalConfig, "vdsettings.ini")));

            //for test
#if UNITY_EDITOR
            IsAppCheck = GlobalSettings.UF_GetGlobalValue("DEBUG", "REVIEW") == "1";
#endif

            if (IsAppCheck)
            {
                //审核配置覆盖
                yield return(GameMain.Instance.StartCoroutine(UF_IELoadSettingsFile(GlobalConfig, "rwsettings.ini")));
            }

            CheckPointManager.UF_Send(2);

            ResPrefix = GlobalSettings.UF_GetGlobalValue("APP", "RES_PREFIX");
            ResSuffix = GlobalSettings.UF_GetGlobalValue("APP", "RES_SUFFIX");

            ResBKey           = GHelper.UF_ParseInt(GlobalSettings.UF_GetGlobalValue("APP", "RES_BKEY"));
            EncBKey           = GHelper.UF_ParseInt(GlobalSettings.UF_GetGlobalValue("APP", "ENC_KEY"));
            IsRawAsset        = InstallMode == "raw";
            Debugger.IsActive = GlobalSettings.UF_GetGlobalValue("DEBUG", "CONSOLE") == "1" ||
                                GlobalSettings.UF_GetUserValue("DEBUG", "PIN_CONSOLE") == "1";
            yield return(null);

            CheckPointManager.UF_Send(3);
        }
Esempio n. 3
0
 public int UF_GetIntParam(string key)
 {
     return(GHelper.UF_ParseInt(UF_GetParam(key)));
 }