| System/PhantasmPavilion/PhantasmPavilionItem.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/PhantasmPavilion/PhantasmPavilionModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/PhantasmPavilion/PhantasmPavilionWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/PhantasmPavilion/PhantasmPavilionItem.cs
@@ -14,7 +14,6 @@ [SerializeField] UIEffect uiEffect; [SerializeField] RedpointBehaviour redpointBehaviour; const int MaxStarCount = 10; [SerializeField] GameObject StarGroup; [SerializeField] List<ImageEx> starList = new List<ImageEx>(); //星星显示隐藏 starList和starShowList数量一致 [SerializeField] List<ImageEx> starShowList = new List<ImageEx>(); //星星是亮是暗 @@ -60,11 +59,12 @@ int star = 0; if (info != null) star = info.Star; for (int i = 0; i < MaxStarCount; i++) for (int i = 0; i < starList.Count; i++) { starList[i].SetActive(i < maxStar && i < MaxStarCount); starShowList[i].SetActive(i < star && i < MaxStarCount); starList[i].SetActive(i < maxStar && i< starList.Count); starShowList[i].SetActive(i < star && i < starList.Count); } model.SetStarColor(star, starShowList); btnChoose.SetListener(OnClickChoose); } System/PhantasmPavilion/PhantasmPavilionModel.cs
@@ -244,6 +244,42 @@ } } public void SetStarColor(int nowStar, List<ImageEx> starShowList) { for (int i = 0; i < starShowList.Count; i++) { // 根据星级设置不同颜色的星星 if (nowStar <= 10) { starShowList[i].SetSprite("TreasureStar1"); // 黄色星星 } else if (nowStar <= 20) { int blueStars = nowStar - 10; if (i < blueStars) { starShowList[i].SetSprite("TreasureStar2"); // 蓝色星星 } else { starShowList[i].SetSprite("TreasureStar1"); // 黄色星星 } } else { int purpleStars = nowStar - 20; if (i < purpleStars) { starShowList[i].SetSprite("TreasureStar3"); // 紫色星星 } else { starShowList[i].SetSprite("TreasureStar2"); // 蓝色星星 } } } } //获取不同职业对应的默认值 public bool TryGetDefaultID(PhantasmPavilionTab key, int job, out int defaultID) { System/PhantasmPavilion/PhantasmPavilionWin.cs
@@ -20,7 +20,6 @@ [SerializeField] ButtonEx btnUse; [SerializeField] Button btnClose; const int MaxStarCount = 10; [SerializeField] GameObject StarGroup; [SerializeField] List<ImageEx> starList = new List<ImageEx>(); //星星显示隐藏 starList和starShowList数量一致 [SerializeField] List<ImageEx> starShowList = new List<ImageEx>(); //星星是亮是暗 @@ -291,11 +290,12 @@ int star = 0; if (info != null) star = info.Star; for (int i = 0; i < MaxStarCount; i++) for (int i = 0; i < starList.Count; i++) { starList[i].SetActive(i < maxStar && i < MaxStarCount); starShowList[i].SetActive(i < star && i < MaxStarCount); starList[i].SetActive(i < maxStar && i < starList.Count); starShowList[i].SetActive(i < star && i < starList.Count); } model.SetStarColor(star, starShowList); if (isUnLockNeedItem) {