예제 #1
0
 public void Load(string file)
 {
     if (!IsLoaded)
     {
         ManagerImproveJsonData jsonData = JsonConvert.DeserializeObject <ManagerImproveJsonData>(Resources.Load <TextAsset>(file).text);
         Improvements = new ManagerImproveData(jsonData);
         IsLoaded     = true;
     }
 }
예제 #2
0
        public ManagerImproveData(ManagerImproveJsonData jsonData)
        {
            EfficiencyImprovements = new Dictionary <int, ManagerEfficiencyImproveData>();
            if (jsonData.efficiencyImprovements != null)
            {
                foreach (var kvp in jsonData.efficiencyImprovements)
                {
                    EfficiencyImprovements.Add(kvp.Key, new ManagerEfficiencyImproveData(kvp.Value));
                }
            }

            RollbackImprovements = new Dictionary <int, ManagerRollbackImproveData>();
            if (jsonData.rollbackImprovements != null)
            {
                foreach (var kvp in jsonData.rollbackImprovements)
                {
                    RollbackImprovements.Add(kvp.Key, new ManagerRollbackImproveData(kvp.Value));
                }
            }

            MegaImprovement = new MegaManagerImproveData(jsonData.megaImprovement);
        }