示例#1
0
 public static void Init(Dictionary <int, CommonConfig> configCache)
 {
     _configCache = configCache;
     Data         = configCache[0];
 }
示例#2
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));
            })));
        }