Example #1
0
 private string[] GetClientVersion()
 {
     return(XUtility.GetConfigTxt("client_version", ".txt").Trim().Split(new char[]
     {
         '.'
     }));
 }
Example #2
0
 public static void Init()
 {
     if (PreloadUIBaseSystem.mResourcePaths == null)
     {
         PreloadUIBaseSystem.preload_uibase_map.Clear();
         PreloadUIBaseSystem.mResourcePaths = Utils.ReadFromMemory(XUtility.GetConfigTxt("preload_uibase2json", ".txt"));
         Debug.Log("===>preloaduibse2json count = " + PreloadUIBaseSystem.mResourcePaths.get_Count());
         IEnumerator enumerator = PreloadUIBaseSystem.mResourcePaths.get_Keys().GetEnumerator();
         try
         {
             while (enumerator.MoveNext())
             {
                 object current = enumerator.get_Current();
                 PreloadUIBaseSystem.preload_uibase_map.set_Item(current.ToString(), PreloadUIBaseSystem.mResourcePaths.get_Item(current).ToString().Split(new char[]
                 {
                     ';'
                 }));
             }
         }
         finally
         {
             IDisposable disposable = enumerator as IDisposable;
             if (disposable != null)
             {
                 disposable.Dispose();
             }
         }
         PreloadUIBaseSystem.mResourcePaths.Clear();
     }
 }
Example #3
0
 public static void Init()
 {
     if (FileSystem.mResourcePaths == null)
     {
         FileSystem.mResourcePaths = Utils.ReadFromMemory(XUtility.GetConfigTxt("resources2json", ".txt"));
     }
     Debug.Log("===>resources2json count = " + FileSystem.mResourcePaths.get_Count());
 }
Example #4
0
 public void Initialize(Action <string> loadFailed = null)
 {
     AssetLoader.useDynamicLoader = true;
     this.LoadFailed = loadFailed;
     if (Application.get_isEditor())
     {
         if (Directory.Exists(PathSystem.GetEditorDataDir()))
         {
             AppConst.ResourcePath = PathSystem.GetEditorDataDir();
         }
         this.InitPackageFileList();
     }
     if (this.m_assetName2abInfoMap == null)
     {
         this.m_assetName2abInfoMap = SerializeUtility.DeserializeXDictFromMemory <string, AssetBundleInfo>(XUtility.GetConfigTxt("abmap", ".txt"));
     }
     this.m_manifest = (AssetLoader.LoadAssetNow("AssetBundleManifest", typeof(AssetBundleManifest)) as AssetBundleManifest);
     if (this.m_manifest == null)
     {
         Debug.LogError("manifest加载失败");
     }
 }
Example #5
0
    public static bool filter(string content, out string result_str, int filter_deep = 1, bool check_only = false, bool bTrim = false, string replace_str = "*")
    {
        string text = content;

        if (bTrim)
        {
            text = text.Trim();
        }
        result_str = text;
        if (WordFilter.s_filters == null)
        {
            WordFilter.s_filters = XUtility.GetConfigTxt("Word", ".txt").Trim().Replace("\r\n", string.Empty).Split(new char[]
            {
                '|'
            }, 1);
        }
        bool result = false;

        for (int i = 0; i < WordFilter.s_filters.Length; i++)
        {
            string text2 = WordFilter.s_filters[i];
            string text3 = text2.Replace(replace_str, string.Empty);
            if (text3.get_Length() != 0)
            {
                bool flag = true;
                while (flag)
                {
                    int num  = -1;
                    int num2 = -1;
                    int j    = 0;
                    while (j < text3.get_Length())
                    {
                        string text4 = text3.Substring(j, 1);
                        if (!(text4 == replace_str))
                        {
                            if (num2 + 1 >= text.get_Length())
                            {
                                flag = false;
                                break;
                            }
                            int num3 = text.IndexOf(text4, num2 + 1, 5);
                            if (num3 == -1)
                            {
                                flag = false;
                                break;
                            }
                            if (j > 0 && num3 - num2 > filter_deep + 1)
                            {
                                flag = false;
                                break;
                            }
                            num2 = num3;
                            if (num == -1)
                            {
                                num = num3;
                            }
                            j++;
                        }
                    }
                    if (flag)
                    {
                        if (check_only)
                        {
                            return(true);
                        }
                        result = true;
                        string text5 = text.Substring(0, num);
                        for (int k = num; k <= num2; k++)
                        {
                            text5 += replace_str;
                        }
                        string text6 = text.Substring(num2 + 1);
                        text = text5 + text6;
                    }
                }
            }
        }
        result_str = text;
        return(result);
    }