public static CampInfo InitInfo(int campID) { CampInfo info = new CampInfo(); var _meta = CampModule.GetCampDataByKey(campID); if (_meta != null) { info.CampID = _meta.CampID; info.campName = MultiLanguage.Instance.GetTextValue(_meta.CampName); info.campDesc = MultiLanguage.Instance.GetTextValue(_meta.CampDesc); info.campIconPath = _meta.CampIcon; info.campBGSmallPath = _meta.CampBGSmall; info.hardLevel = _meta.HardLevel; info.defualtHardLevelValue = _meta.DefaultHardLevel; info.creedInfo = CampCreedInfo.InitInfo(_meta.CreedID); info.attributeInfo = CampModule.GetCampAttribueInfoList(_meta.CampID); ///Init DefaultLeader info.campLeaderList = CampModule.GetCampDefaultLeaderList(_meta.CampID); return(info); } DebugPlus.LogError("[CampInfo] : Init Fail! campID=" + campID); return(null); }
public CampInfo GetCampInfoData(int campID) { CampInfo result = null; result = campPrepareInfoList.Find(x => x.CampID == campID); if (result == null) { DebugPlus.LogError("GetCampData Info Null! campID=" + campID); } return(result); }
public static List <CampInfo> GetAllCampInfo() { List <CampInfo> result = new List <CampInfo>(); foreach (var item in campDataDic.Values) { if (item.CampType == 1) { CampInfo campInfo = CampInfo.InitInfo(item.CampID); result.Add(campInfo); } } return(result); }
public void ClearData() { currentCampInfo = null; currentLeaderInfoList = null; hardLevelValue = 0; prepareAIDataList.Clear(); prepareAIDataList.Clear(); GamePrepare_AI_Maintenance = 0; GamePrepare_AI_Builder = 0; GamePrepare_AI_Operator = 0; GamePrepare_ResourceRichness = 0; GamePrepare_Currency = 0; GamePrepare_EnemyHardLevel = 0; GamePrepare_Research_Coefficient = 0; GamePrepare_RoCore = 0; }
public void ChangeSelectCamp(CampInfo info) { gamePrepareData.currentCampInfo = info; }