Esempio n. 1
0
        public void LoadData()
        {
            Config.JsonReader reader = new Config.JsonReader();
            TechGroupConfig config = reader.LoadJsonDataConfig<TechGroupConfig>(Config.JsonConfigPath.TechGroupConfigJsonPath);
            InitGroupIndexList = config.InitGroupIndexList;
            configList = config.configList;

            indexCheck.Clear();
            for(int i = 0; i < configList.Count; i++)
            {
                if(!indexCheck.Contains(configList[i].groupIndex))
                {
                    indexCheck.Add(configList[i].groupIndex);
                }
                else
                {
                    Debug.LogError("Parse TechGroupConfig Error! Index Can not be same! ");
                }

                if (configList[i].ObjectNum != configList[i].techElementList.Count)
                {
                    Debug.LogError("Parse TechGroupConfig Error! Num not Matching!  groupIndex=" + config.configList[i].groupIndex);
                }
            }
            if(InitGroupIndexList.Count!= configList.Count)
            {
                Debug.LogError("Parse TechGroupConfig Error! Num not Matching!  InitGroupIndexListCount="+InitGroupIndexList.Count);
            }

        }
Esempio n. 2
0
        public MaterialConfig LoadConfigData()
        {
            Config.JsonReader reader = new Config.JsonReader();

            MaterialConfig config = reader.LoadJsonDataConfig <MaterialConfig>(Config.JsonConfigPath.MaterialConfigJsonPath);

            return(config);
        }
Esempio n. 3
0
        public GeneralModifier LoadModifierData()
        {
            Config.JsonReader reader = new Config.JsonReader();
            var modifer = reader.LoadJsonDataConfig <GeneralModifier>(Config.JsonConfigPath.ModifierDataConfigJsonPath);

            ModifierBase = modifer.ModifierBase;
            return(modifer);
        }
Esempio n. 4
0
        public void ReadData()
        {
            Config.JsonReader   reader = new Config.JsonReader();
            BaseResourcesConfig config = reader.LoadJsonDataConfig <BaseResourcesConfig>(Config.JsonConfigPath.BaseResourceJsonPath);

            CurrencyName = config.CurrencyName;
            CurrencyIcon = Utility.LoadSprite(config.CurrencyIconPath);
        }
Esempio n. 5
0
        public void LoadData()
        {
            Config.JsonReader reader = new Config.JsonReader();
            var config = reader.LoadJsonDataConfig <TechnologyConfigCommon>(Config.JsonConfigPath.TechnologyConfigCommon);

            techFinishEffect = config.techFinishEffect;
            techRequireData  = config.techRequireData;
        }
Esempio n. 6
0
        public void ReadOrderConfigData()
        {
            Config.JsonReader reader = new Config.JsonReader();
            OrderConfig       config = reader.LoadJsonDataConfig <OrderConfig>(Config.JsonConfigPath.OrderConfigJsonPath);

            order_max_count_default = config.order_max_count_default;
            orderContent            = config.orderContent;
            ///Add Dic
            orderContentDic = new Dictionary <string, OrderContent>();
            for (int i = 0; i < orderContent.Count; i++)
            {
                if (orderContentDic.ContainsKey(orderContent[i].ConfigID))
                {
                    Debug.LogError("Find Same Order Config ID , ID=" + orderContent[i].ConfigID);
                    continue;
                }
                else
                {
                    orderContentDic.Add(orderContent[i].ConfigID, orderContent[i]);
                }
            }
        }