Пример #1
0
 private void LoadAllConfig()
 {
     RoleConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, RoleConfig> >(
                         File.ReadAllText(m_dataPath + typeof(RoleConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     CGSceneConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, CGSceneConfig> >(
                            File.ReadAllText(m_dataPath + typeof(CGSceneConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     CGScenePointConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CGScenePointConfig> >(
                                 File.ReadAllText(m_dataPath + typeof(CGScenePointConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     CGScenePointTouchConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CGScenePointTouchConfig> >(
                                      File.ReadAllText(m_dataPath + typeof(CGScenePointTouchConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     EvidenceConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, EvidenceConfig> >(
                             File.ReadAllText(m_dataPath + typeof(EvidenceConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
 }
Пример #2
0
 private void LoadAllConfig()
 {
     RoleConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, RoleConfig> >(
                         File.ReadAllText(m_dataPath + typeof(RoleConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     CGSceneConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, CGSceneConfig> >(
                            File.ReadAllText(m_dataPath + typeof(CGSceneConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     CGScenePointConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CGScenePointConfig> >(
                                 File.ReadAllText(m_dataPath + typeof(CGScenePointConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     CGScenePointTouchConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CGScenePointTouchConfig> >(
                                      File.ReadAllText(m_dataPath + typeof(CGScenePointTouchConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     EvidenceConfig.Init(JsonConvert.DeserializeObject <NormalHGData>(
                             File.ReadAllText(m_dataPath + typeof(EvidenceConfig).Name + m_jsonSuffix, Encoding.UTF8)));
     CommonConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CommonConfig> >(
                           File.ReadAllText(m_dataPath + typeof(CommonConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     ControversyConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, ControversyConfig> >(
                                File.ReadAllText(m_dataPath + typeof(ControversyConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     ControversyBarrageConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, ControversyBarrageConfig> >(
                                       File.ReadAllText(m_dataPath + typeof(ControversyBarrageConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     ControversySpecialBarrageConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, ControversySpecialBarrageConfig> >(
                                              File.ReadAllText(m_dataPath + typeof(ControversySpecialBarrageConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
     ControversyCharacterConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, ControversyCharacterConfig> >(
                                         File.ReadAllText(m_dataPath + typeof(ControversyCharacterConfig).Name + m_jsonSuffix, Encoding.GetEncoding("GB2312"))));
 }
Пример #3
0
        public IEnumerator LoadAllConfig()
        {
            yield return(StartCoroutine(LoadConfig <RoleConfig>((file) =>
            {
                RoleConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, RoleConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <CGSceneConfig>((file) =>
            {
                CGSceneConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, CGSceneConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <CGScenePointConfig>((file) =>
            {
                CGScenePointConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CGScenePointConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <CGScenePointTouchConfig>((file) =>
            {
                CGScenePointTouchConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CGScenePointTouchConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <EvidenceConfig>((file) =>
            {
                EvidenceConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, EvidenceConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <CommonConfig>((file) =>
            {
                CommonConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, CommonConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <ControversyConfig>((file) =>
            {
                ControversyConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, ControversyConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <ControversyBarrageConfig>((file) =>
            {
                ControversyBarrageConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, ControversyBarrageConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <ControversySpecialBarrageConfig>((file) =>
            {
                ControversySpecialBarrageConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, ControversySpecialBarrageConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <ControversyCharacterConfig>((file) =>
            {
                ControversyCharacterConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, ControversyCharacterConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <TalkPanelConfig>((file) =>
            {
                TalkPanelConfig.Init(JsonConvert.DeserializeObject <Dictionary <int, TalkPanelConfig> >(file));
            })));

            yield return(StartCoroutine(LoadConfig <EvidenceStoryConfig>((file) =>
            {
                EvidenceStoryConfig.Init(JsonConvert.DeserializeObject <Dictionary <string, EvidenceStoryConfig> >(file));
            })));
        }