Example #1
0
    private bool LoadCategoryInfoList(Dictionary <string, int> dictEnumSrc)
    {
        TextAsset textAsset = Resources.Load <TextAsset>("cf_customhead");

        string[,] array;
        GetListString(textAsset.text, out array);
        int length  = array.GetLength(0);
        int length2 = array.GetLength(1);

        dictCategory.Clear();
        if (length != 0 && length2 != 0)
        {
            int num = 0;
            for (int i = 0; i < length; i++)
            {
                CategoryInfo categoryInfo = new CategoryInfo();
                categoryInfo.Initialize();
                num = int.Parse(array[i, 0]);
                categoryInfo.name = array[i, 1];
                int id = 0;
                if (!dictEnumSrc.TryGetValue(categoryInfo.name, out id))
                {
                    string message3 = "SrcBone【" + categoryInfo.name + "】のIDが見つかりません";
                    Debug.LogWarning(message3);
                }
                else
                {
                    categoryInfo.id        = id;
                    categoryInfo.use[0][0] = (!(array[i, 2] == "0") && true);
                    categoryInfo.use[0][1] = (!(array[i, 3] == "0") && true);
                    categoryInfo.use[0][2] = (!(array[i, 4] == "0") && true);
                    if (categoryInfo.use[0][0] || categoryInfo.use[0][1] || categoryInfo.use[0][2])
                    {
                        categoryInfo.getflag[0] = true;
                    }
                    categoryInfo.use[1][0] = (!(array[i, 5] == "0") && true);
                    categoryInfo.use[1][1] = (!(array[i, 6] == "0") && true);
                    categoryInfo.use[1][2] = (!(array[i, 7] == "0") && true);
                    if (categoryInfo.use[1][0] || categoryInfo.use[1][1] || categoryInfo.use[1][2])
                    {
                        categoryInfo.getflag[1] = true;
                    }
                    categoryInfo.use[2][0] = (!(array[i, 8] == "0") && true);
                    categoryInfo.use[2][1] = (!(array[i, 9] == "0") && true);
                    categoryInfo.use[2][2] = (!(array[i, 10] == "0") && true);
                    if (categoryInfo.use[2][0] || categoryInfo.use[2][1] || categoryInfo.use[2][2])
                    {
                        categoryInfo.getflag[2] = true;
                    }
                    List <CategoryInfo> list = null;
                    if (!dictCategory.TryGetValue(num, out list))
                    {
                        list = new List <CategoryInfo>();
                        dictCategory[num] = list;
                    }
                    list.Add(categoryInfo);
                }
            }
        }
        // AssetBundleManager.UnloadAssetBundle(assetBundleName, true, null);
        return(true);
    }