Exemplo n.º 1
0
    public static void Load()
    {
        string strData = C_Save.LoadString(Name, C_LocalPath.StreamingAssetsConfigPath);

        if (!string.IsNullOrEmpty(strData))
        {
            WordBallConfigItemList.Clear();

            JsonData WordBallConfigItemListJD = C_Json.GetJsonKeyJsonData(strData, "WordBallConfigItemList");
            if (WordBallConfigItemListJD != null)
            {
                for (int i = 0; i < WordBallConfigItemListJD.Count; i++)
                {
                    if (WordBallConfigItemListJD[i] != null)
                    {
                        FieldGuideConfigItem item = new FieldGuideConfigItem();

                        item.ID       = C_Json.GetJsonKeyInt(WordBallConfigItemListJD[i], "ID");
                        item.Name     = C_Json.GetJsonKeyString(WordBallConfigItemListJD[i], "Name");
                        item.Type     = C_Json.GetJsonKeyInt(WordBallConfigItemListJD[i], "Type");
                        item.BallType = C_Json.GetJsonKeyInt(WordBallConfigItemListJD[i], "BallType");

                        WordBallConfigItemList.Add(item);
                    }
                }
            }
        }
    }
Exemplo n.º 2
0
    static void OpenScene(string path, string moudlePath)
    {
        ModelData data      = new ModelData();
        string    stageJson = C_Save.LoadString(path + ".json", moudlePath, "", new C_SaveSimpleEncoder(), new System.Text.UTF8Encoding(false));

        Debug.Log("StageMgr LoadStage stage:" + path + ", stageJson:" + stageJson);
        InitData(data, stageJson);
        SplitJointCutscene.ReplaceArt(data.PathArtRootNodeName, data.PathDesRootNodeName, data.ArtSceneName, data.DesSceneName, data.PathReplaceList, "");
        SplitJointCutscene.ReplaceArt(data.CutsceneArtRootNodeName, data.CutsceneDesRootNodeName, data.ArtSceneName, data.DesSceneName, data.CutsceneReplaceList, _CutSceneRootTag);
    }
Exemplo n.º 3
0
    public static void Load()
    {
        //  string data = C_DataMgr.Instance.LoadData(Name);
        string data = C_Save.LoadString(Name, Application.dataPath + "/../Config/");

        if (!string.IsNullOrEmpty(data))
        {
            UpdateData(data);
        }
    }
Exemplo n.º 4
0
    public static void Load()
    {
        string strData = C_Save.LoadString(Name, C_LocalPath.StreamingAssetsConfigPath);

        if (!string.IsNullOrEmpty(strData))
        {
            FormalHotUpdate = C_Json.GetJsonKeyString(strData, "FormalHotUpdate");
            TestHotUpdate   = C_Json.GetJsonKeyString(strData, "TestHotUpdate");

            FormalHost = C_Json.GetJsonKeyString(strData, "FormalHost");
            TestHost   = C_Json.GetJsonKeyString(strData, "TestHost");

            FormalPinYinHost = C_Json.GetJsonKeyString(strData, "FormalPinYinHost");
            TestPinYinHost   = C_Json.GetJsonKeyString(strData, "TestPinYinHost");

            FormalPayHost = C_Json.GetJsonKeyString(strData, "FormalPayHost");
            TestPayHost   = C_Json.GetJsonKeyString(strData, "TestPayHost");

            FormalCommonHost = C_Json.GetJsonKeyString(strData, "FormalCommonHost");
            TestCommonHost   = C_Json.GetJsonKeyString(strData, "TestCommonHost");


            BabyNameMP3Url = C_Json.GetJsonKeyString(strData, "BabyNameMP3Url");


            SMSLoginCode = C_Json.GetJsonKeyString(strData, "SMSLoginCode");
            LoginPhoneVerificationCode = C_Json.GetJsonKeyString(strData, "LoginPhoneVerificationCode");
            LoginWeChat       = C_Json.GetJsonKeyString(strData, "LoginWeChat");
            LoginWeChatQRCode = C_Json.GetJsonKeyString(strData, "LoginWeChatQRCode");
            LoginUID          = C_Json.GetJsonKeyString(strData, "LoginUID");
            LoginVisitor      = C_Json.GetJsonKeyString(strData, "LoginVisitor");
            LogoutVisitor     = C_Json.GetJsonKeyString(strData, "LogoutVisitor");
            BindingPhone      = C_Json.GetJsonKeyString(strData, "BindingPhone");
            BindingWeChat     = C_Json.GetJsonKeyString(strData, "BindingWeChat");


            SetHeadImg = C_Json.GetJsonKeyString(strData, "SetHeadImg");

            SetBabyInfo = C_Json.GetJsonKeyString(strData, "SetBabyInfo");

            GetNameVideo = C_Json.GetJsonKeyString(strData, "GetNameVideo");

            GetVIPInfo = C_Json.GetJsonKeyString(strData, "GetVIPInfo");


            GetChannelConfig = C_Json.GetJsonKeyString(strData, "GetChannelConfig");
            GetStoreConfig   = C_Json.GetJsonKeyString(strData, "GetStoreConfig");
        }
    }
Exemplo n.º 5
0
    public string LoadString(string resName, string resPath, string resType, string exResPath = "")
    {
        string tempResPath = "";

        if (string.IsNullOrEmpty(exResPath))
        {
            tempResPath = LocalPath.PackagingResources + "/" + resPath + "/" + resType + "/";
        }
        else
        {
            tempResPath = LocalPath.PackagingResources + "/" + exResPath;
        }

        string realResPath = LocalPath.HotUpdatePath + tempResPath;

        if (!File.Exists(tempResPath + resName))
        {
            tempResPath = LocalPath.StreamingAssetsPath + tempResPath;
        }

        string result = C_Save.LoadString(resName, realResPath);

        if (string.IsNullOrEmpty(result))
        {
            if (string.IsNullOrEmpty(exResPath))
            {
                realResPath = "PackagingResources/" + resPath + "/" + resType + "/";
            }
            else
            {
                realResPath = "PackagingResources/" + exResPath;
            }

            TextAsset textAsset = Resources.Load <TextAsset>(realResPath + C_String.DeleteExpandedName(resName));
            if (textAsset != null)
            {
                result = textAsset.text;
            }
        }

        return(result);
    }
Exemplo n.º 6
0
    public string LoadString(string resName, string resPath)
    {
        string realResPath = LocalPath.HotUpdatePath + resPath;

        if (!File.Exists(realResPath + resName))
        {
            realResPath = LocalPath.StreamingAssetsPath + resPath;
        }

        string result = C_Save.LoadString(resName, realResPath);

        if (string.IsNullOrEmpty(result))
        {
            TextAsset textAsset = Resources.Load <TextAsset>(realResPath + C_String.DeleteExpandedName(resName));
            if (textAsset != null)
            {
                result = textAsset.text;
            }
        }

        return(result);
    }
Exemplo n.º 7
0
    public static void Load()
    {
        string strData = C_Save.LoadString(Name, C_LocalPath.StreamingAssetsConfigPath);

        if (!string.IsNullOrEmpty(strData))
        {
            JsonData learningRhythmNameJD = C_Json.GetJsonKeyJsonData(strData, "LearningRhythmName");
            if (learningRhythmNameJD != null)
            {
                LearningRhythmName = new string[learningRhythmNameJD.Count];

                for (int i = 0; i < learningRhythmNameJD.Count; i++)
                {
                    LearningRhythmName[i] = (string)learningRhythmNameJD[i];
                }
            }

            JsonData learningRhythmCourseJD = C_Json.GetJsonKeyJsonData(strData, "LearningRhythmCourse");
            if (learningRhythmCourseJD != null)
            {
                LearningRhythmCourse = new int[learningRhythmCourseJD.Count];

                for (int i = 0; i < learningRhythmCourseJD.Count; i++)
                {
                    LearningRhythmCourse[i] = (int)learningRhythmCourseJD[i];
                }
            }

            JsonData learningTimeNameJD = C_Json.GetJsonKeyJsonData(strData, "LearningTimeName");
            if (learningTimeNameJD != null)
            {
                LearningTimeName = new string[learningTimeNameJD.Count];

                for (int i = 0; i < learningTimeNameJD.Count; i++)
                {
                    LearningTimeName[i] = (string)learningTimeNameJD[i];
                }
            }

            JsonData learningTimeJD = C_Json.GetJsonKeyJsonData(strData, "LearningTime");
            if (learningTimeJD != null)
            {
                LearningTime = new int[learningTimeJD.Count];

                for (int i = 0; i < learningTimeJD.Count; i++)
                {
                    LearningTime[i] = (int)learningTimeJD[i];
                }
            }

            JsonData restTimeNameJD = C_Json.GetJsonKeyJsonData(strData, "RestTimeName");
            if (restTimeNameJD != null)
            {
                RestTimeName = new string[restTimeNameJD.Count];

                for (int i = 0; i < restTimeNameJD.Count; i++)
                {
                    RestTimeName[i] = (string)restTimeNameJD[i];
                }
            }

            JsonData restTimeJD = C_Json.GetJsonKeyJsonData(strData, "RestTime");
            if (restTimeJD != null)
            {
                RestTime = new int[restTimeJD.Count];

                for (int i = 0; i < restTimeJD.Count; i++)
                {
                    RestTime[i] = (int)restTimeJD[i];
                }
            }
        }
    }
Exemplo n.º 8
0
    public static void Load()
    {
        string strData = C_Save.LoadString(Name, C_LocalPath.StreamingAssetsConfigPath);

        if (!string.IsNullOrEmpty(strData))
        {
            JsonData levelMaxStarJD = C_Json.GetJsonKeyJsonData(strData, "LevelMaxStar");
            if (levelMaxStarJD != null)
            {
                LevelMaxStar = new int[levelMaxStarJD.Count];

                for (int i = 0; i < levelMaxStarJD.Count; i++)
                {
                    LevelMaxStar[i] = (int)levelMaxStarJD[i];
                }
            }

            JsonData levelNameJD = C_Json.GetJsonKeyJsonData(strData, "LevelName");
            if (levelNameJD != null)
            {
                LevelName = new string[levelNameJD.Count];

                for (int i = 0; i < levelNameJD.Count; i++)
                {
                    LevelName[i] = (string)levelNameJD[i];
                }
            }

            JsonData levelUnlockStageJD = C_Json.GetJsonKeyJsonData(strData, "LevelUnlockStage");
            if (levelUnlockStageJD != null)
            {
                LevelUnlockStage = new string[levelUnlockStageJD.Count];

                for (int i = 0; i < levelUnlockStageJD.Count; i++)
                {
                    LevelUnlockStage[i] = (string)levelUnlockStageJD[i];
                }
            }

            JsonData gradeMaxStarJD = C_Json.GetJsonKeyJsonData(strData, "GradeMaxStar");
            if (gradeMaxStarJD != null)
            {
                GradeMaxStar = new int[gradeMaxStarJD.Count];

                for (int i = 0; i < gradeMaxStarJD.Count; i++)
                {
                    GradeMaxStar[i] = (int)gradeMaxStarJD[i];
                }
            }

            JsonData gradeNameJD = C_Json.GetJsonKeyJsonData(strData, "GradeName");
            if (gradeNameJD != null)
            {
                GradeName = new string[gradeNameJD.Count];

                for (int i = 0; i < gradeNameJD.Count; i++)
                {
                    GradeName[i] = (string)gradeNameJD[i];
                }
            }

            JsonData gradeUnlockStageJD = C_Json.GetJsonKeyJsonData(strData, "GradeUnlockStage");
            if (gradeUnlockStageJD != null)
            {
                GradeUnlockStage = new string[gradeUnlockStageJD.Count];

                for (int i = 0; i < gradeUnlockStageJD.Count; i++)
                {
                    GradeUnlockStage[i] = (string)gradeUnlockStageJD[i];
                }
            }
        }
    }