void GeneratePlayerLvlInfoList() { for (int i = 0; i < trsPlayerLvlInfoRoot.childCount; i++) { GameObject.Destroy(trsPlayerLvlInfoRoot.GetChild(i).gameObject); } // TODO::玩家等级需要判断最高玩家等级 string playerlvl = (GameData.nPlayerLv + 1).ToString(); PlayerLvlData playerlvldata = DataCenter.Instance.dictPlyerLvlData [playerlvl]; // 玩家升级信息:解锁建筑 for (int i = 0; i < playerlvldata.TableUnlock.Count; i++) { var item = GameObject.Instantiate(objSlotItem) as GameObject; item.name = DataCenter.Instance.dictBuilding [playerlvldata.TableUnlock [i]].Name; item.transform.SetParent(trsPlayerLvlInfoRoot); item.transform.localScale = Vector3.one; item.GetComponent <UISlotItem> ().imgIcon.sprite = DataCenter.Instance.dictBuilding [playerlvldata.TableUnlock [i]].IconSprite; // TODO::品质 item.GetComponent <UISlotItem> ().ShowQuality = false; item.GetComponent <UISlotItem> ().ShowScore = false; item.GetComponent <UISlotItem>().ShowCount = false; item.GetComponent <UISlotItem>().ShowScore = false; } // 玩家升级信息:解锁任务 for (int i = 0; i < playerlvldata.TaskUnlock.Count; i++) { var item = GameObject.Instantiate(objSlotItem) as GameObject; item.name = DataCenter.Instance.dictBuildingTask[playerlvldata.TaskUnlock [i]].Name; item.transform.SetParent(trsPlayerLvlInfoRoot); item.transform.localScale = Vector3.one; string productid = DataCenter.Instance.dictBuildingTask [playerlvldata.TaskUnlock [i]].Product.strId; item.GetComponent <UISlotItem> ().imgIcon.sprite = DataCenter.Instance.dictItem [productid].IconSprite; // TODO::品质 // 疑问:为啥界面中还在显示 item.GetComponent <UISlotItem> ().ShowQuality = false; item.GetComponent <UISlotItem> ().ShowScore = false; item.GetComponent <UISlotItem>().ShowCount = false; item.GetComponent <UISlotItem>().ShowScore = false; } // 标题信息 tmPlayerLvInfoText.text = "Next Lv : " + playerlvldata.Lv.ToString(); }
void PanelInit() { // TODO::玩家等级需要判断最高玩家等级 string playerlvl = GameData.nPlayerLv.ToString(); PlayerLvlData playerlvldata = DataCenter.Instance.dictPlyerLvlData[playerlvl]; // 玩家升级信息:解锁建筑 for (int i = 0; i < playerlvldata.TableUnlock.Count; i++) { var item = GameObject.Instantiate(objPrize) as GameObject; item.name = DataCenter.Instance.dictBuilding[playerlvldata.TableUnlock[i]].Name; item.transform.SetParent(trsPrizeRoot); item.transform.localScale = Vector3.one; item.GetComponent <UISlotItem>().imgIcon.sprite = DataCenter.Instance.dictBuilding[playerlvldata.TableUnlock[i]].IconSprite; // TODO::品质 item.GetComponent <UISlotItem>().ShowQuality = false; item.GetComponent <UISlotItem>().ShowScore = false; item.GetComponent <UISlotItem>().ShowCount = false; item.GetComponent <UISlotItem>().ShowScore = false; } // 玩家升级信息:解锁任务 for (int i = 0; i < playerlvldata.TaskUnlock.Count; i++) { var item = GameObject.Instantiate(objPrize) as GameObject; item.name = DataCenter.Instance.dictBuildingTask[playerlvldata.TaskUnlock[i]].Name; item.transform.SetParent(trsPrizeRoot); item.transform.localScale = Vector3.one; string productid = DataCenter.Instance.dictBuildingTask[playerlvldata.TaskUnlock[i]].Product.strId; item.GetComponent <UISlotItem>().imgIcon.sprite = DataCenter.Instance.dictItem[productid].IconSprite; // TODO::品质 // 疑问:为啥界面中还在显示 item.GetComponent <UISlotItem>().ShowQuality = false; item.GetComponent <UISlotItem>().ShowScore = false; item.GetComponent <UISlotItem>().ShowCount = false; item.GetComponent <UISlotItem>().ShowScore = false; } // 标题信息 txtTitle.text = "Congratulations!!! Lv : " + playerlvldata.Lv.ToString(); }