/// <summary> /// parsing excel data into current format /// </summary> /// <param name="mat">target</param> /// <param name="rep">source</param> /// <returns> parsed item </returns> /// <returns></returns> public static new AbstractObject Parse(AbstractObject mat, ExcelLoading.AbstractObject rep) { AbstractAnimal ani = mat as AbstractAnimal; ExcelLoading.AbstractAnimal aniRep = rep as ExcelLoading.AbstractAnimal; if (ani != null && aniRep != null) { ani.m_butcheringPerPerson = GameAbstractItem.ParseDependencyCounts(aniRep.butchering_per_person); } else { Debug.Log("AbstractAnimal.Parse: critical parse error"); } return(Resource.Parse(mat, rep)); }
/// <summary> /// parsing excel data into current format /// </summary> /// <param name="mat">target</param> /// <param name="rep">source</param> /// <returns> parsed item </returns> /// <returns></returns> public static new AbstractObject Parse(AbstractObject mat, ExcelLoading.AbstractObject rep) { DomesticAnimal ani = mat as DomesticAnimal; ExcelLoading.DomesticAnimalItem aniRep = rep as ExcelLoading.DomesticAnimalItem; if (ani != null && aniRep != null) { ani.m_container = aniRep.storageType.ParseCont(); ani.m_producePerPerson = aniRep.produce_per_person; ani.m_foodType = GameAbstractItem.ParseDependencyCounts(aniRep.foodType); ani.m_additionalProduction = GameAbstractItem.ParseDependencyCounts(aniRep.additionalProducts); //link to domesticAnimal!!! _sAllDomesticAnimal.Add(ani); } else { Debug.Log("WildAnimal.Parse: critical parse error"); } return(AbstractAnimal.Parse(mat, rep)); }