Main/System/HeroUI/GiftBaseCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroCollectionCardCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroCollectionCardCell.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroCollectionLineCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroCollectionLineCell.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroCollectionWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroCollectionWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroGiftEatWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroGiftRoleListCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroLVBreakWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/HeroUI/HeroTrainWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/Utility/UIHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/System/HeroUI/GiftBaseCell.cs
@@ -139,7 +139,7 @@ { var giftConfig = HeroTalentConfig.Get(giftID); SmallTipWin.showText = Language.Get("SmallTipFomat", giftConfig.Name + " " + Language.Get("L1113", giftLV), Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue))); Language.Get("HeroGift5", PlayerPropertyConfig.Get(giftConfig.AttrID).Name, PlayerPropertyConfig.GetValueDescription(giftConfig.AttrID, giftConfig.AttrValue*giftLV))); UIManager.Instance.OpenWindow<SmallTipWin>(); } Main/System/HeroUI/HeroCollectionCardCell.cs
New file @@ -0,0 +1,87 @@ using UnityEngine; using UnityEngine.UI; using System.Collections.Generic; public class HeroCollectionCardCell : MonoBehaviour { [SerializeField] Button heroCardBtn; [SerializeField] Image heroCardBG; [SerializeField] Material glowMaterial; // 流光效果材质 [SerializeField] Text lvText; [SerializeField] Image countryImg; [SerializeField] Image jobImg; [SerializeField] UIHeroController heroModel; [SerializeField] Image onStateImg; [SerializeField] RedpointBehaviour redpoint; [SerializeField] Image trainStateImg; [SerializeField] Text nameText; [SerializeField] Image awakeImg; [SerializeField] Text awakeLVText; [SerializeField] List<Image> starImgList; string guid; public void Display(int index) { guid = HeroUIManager.Instance.heroSortList[index]; var hero = HeroManager.Instance.GetHero(guid); if (hero == null) { this.gameObject.SetActive(false); return; } this.gameObject.SetActive(true); heroCardBG.SetSprite("herocardbg" + hero.Quality); if (glowMaterial != null) { heroCardBG.material = glowMaterial; } lvText.text = Language.Get("L1094") + hero.heroLevel.ToString(); var heroConfig = hero.heroConfig; countryImg.SetSprite(HeroUIManager.Instance.GetCountryIconName(heroConfig.Country)); jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class)); heroModel.Create(heroConfig.SkinIDList[hero.SkinIndex], heroConfig.UIScale); onStateImg.SetActive(hero.IsInTeamByTeamType(TeamType.Story)); redpoint.redpointId = MainRedDot.HeroCardRedpoint * 1000 + hero.itemHero.gridIndex; var funcState = hero.funcState; if (funcState > 0) { trainStateImg.SetActive(true); trainStateImg.SetSprite("herofuncstate" + hero.funcState); } else { trainStateImg.SetActive(false); } nameText.text = hero.breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, hero.breakLevel); awakeImg.SetActive(hero.awakeLevel > 0); awakeLVText.text = hero.awakeLevel.ToString(); for (int i = 0; i < starImgList.Count; i++) { if (hero.heroStar == 0 && i == 0) { // 无星级 特殊处理 starImgList[i].SetActive(true); starImgList[i].SetSprite("herostar" + hero.heroStar); } else if ((hero.heroStar - 1) % starImgList.Count >= i) { starImgList[i].SetActive(true); starImgList[i].SetSprite("herostar" + (((hero.heroStar - 1) / starImgList.Count) + 1) * starImgList.Count); } else { starImgList[i].SetActive(false); } } heroCardBtn.AddListener(() => { HeroUIManager.Instance.selectHeroGuid = guid; UIManager.Instance.OpenWindow<HeroTrainWin>(); }); } } Main/System/HeroUI/HeroCollectionCardCell.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 13346ce9b4f57a64a9219a266123d91f MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Main/System/HeroUI/HeroCollectionLineCell.cs
New file @@ -0,0 +1,23 @@ using UnityEngine; public class HeroCollectionLineCell : CellView { [SerializeField] HeroCardCell[] cardList; public void Display(int index) { for (int i = 0; i < cardList.Length; i++) { if (i + index < HeroUIManager.Instance.heroSortList.Count) { cardList[i].SetActive(true); cardList[i].Display(index + i); } else { cardList[i].SetActive(false); } } } } Main/System/HeroUI/HeroCollectionLineCell.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 1e06f8c655ff0c44cbc7cfe7ea09b808 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Main/System/HeroUI/HeroCollectionWin.cs
New file @@ -0,0 +1,27 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; /// <summary> /// 武将图鉴界面 /// </summary> public class HeroCollectionWin : UIBase { protected override void InitComponent() { } protected override void OnPreOpen() { } protected override void OnPreClose() { } } Main/System/HeroUI/HeroCollectionWin.cs.meta
New file @@ -0,0 +1,11 @@ fileFormatVersion: 2 guid: 2cde85a874c704d438bc433ea5bbbabd MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Main/System/HeroUI/HeroGiftEatWin.cs
@@ -26,15 +26,9 @@ protected override void InitComponent() { addHeroBtn.AddListener(() => { UIManager.Instance.OpenWindow<HeroGiftRoleListWin>(); }); addHeroBtn.AddListener(OpenSelectWin); addHeroGo.AddListener(() => { UIManager.Instance.OpenWindow<HeroGiftRoleListWin>(); }); addHeroGo.AddListener(OpenSelectWin); eatBtn.AddListener(EatHero); } @@ -110,6 +104,22 @@ if (hero == null || eatHero == null) return; if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId, hero.Quality)) { CloseWindow(); SysNotifyMgr.Instance.ShowTip("HeroGift7"); return; } if (hero.IsFullStar()) { CloseWindow(); SysNotifyMgr.Instance.ShowTip("HeroGift1"); return; } var pack = new CB231_tagCSHeroStarUP(); pack.ItemIndex = (ushort)hero.itemHero.gridIndex; pack.UseItemIndex = (ushort)eatHero.itemHero.gridIndex; @@ -129,4 +139,28 @@ }; } void OpenSelectWin() { var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuidForGiftFunc); if (hero == null) { CloseWindow(); return; } if (hero.heroStar >= HeroUIManager.Instance.GetMaxStarCount(hero.heroId, hero.Quality)) { CloseWindow(); SysNotifyMgr.Instance.ShowTip("HeroGift7"); return; } if (hero.IsFullStar()) { CloseWindow(); SysNotifyMgr.Instance.ShowTip("HeroGift1"); return; } UIManager.Instance.OpenWindow<HeroGiftRoleListWin>(); } } Main/System/HeroUI/HeroGiftRoleListCell.cs
@@ -24,7 +24,7 @@ { var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.heroEatList[index]); //上阵 锁定 觉醒 的情况 if (hero.awakeLevel > 0 || hero.breakLevel > 0) if (hero.awakeLevel > 0) { SysNotifyMgr.Instance.ShowTip("HeroReborn1"); return; Main/System/HeroUI/HeroLVBreakWin.cs
@@ -64,8 +64,8 @@ hero.qualityConfig.BreakLVAddPer * (hero.breakLevel + 1)); } moneyIcon.SetOrgSprite(ItemConfig.Get(nextBreakLVConfig.UPCostItem[0]).IconKey); moneyText.text = UIHelper.ShowUseItem(PackType.Item, nextBreakLVConfig.UPCostItem[0], nextBreakLVConfig.UPCostItem[1]); moneyIcon.SetOrgSprite(ItemConfig.Get(hero.qualityBreakConfig.UPCostItem[0]).IconKey); moneyText.text = UIHelper.ShowUseItem(PackType.Item, hero.qualityBreakConfig.UPCostItem[0], hero.qualityBreakConfig.UPCostItem[1]); var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(hero.heroId, hero.breakLevel + 1); if (nextQualityBreakConfig == null) Main/System/HeroUI/HeroTrainWin.cs
@@ -164,6 +164,7 @@ PackManager.Instance.RefreshItemLockEvent += RefreshItemLockEvent; HeroManager.Instance.onHeroChangeEvent += RefreshHeroEvent; UIManager.Instance.OnCloseWindow += OnCloseWindow; HeroUIManager.Instance.OnTeamPosChangeEvent += TeamPosChangeEvent; guid = HeroUIManager.Instance.selectHeroGuid; hero = HeroManager.Instance.GetHero(guid); unfoldState = false; @@ -177,6 +178,7 @@ PackManager.Instance.RefreshItemLockEvent -= RefreshItemLockEvent; HeroManager.Instance.onHeroChangeEvent -= RefreshHeroEvent; UIManager.Instance.OnCloseWindow -= OnCloseWindow; HeroUIManager.Instance.OnTeamPosChangeEvent -= TeamPosChangeEvent; } private void OnCloseWindow(UIBase closeUI) @@ -520,7 +522,6 @@ list.Sort(); string allAttrStr = string.Empty; for (int i = 0; i < list.Count; i++) { var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(hero.heroId, i + 1); @@ -540,7 +541,7 @@ var skill = SkillConfig.Get(nextQualityBreakConfig.SkillID); if (skill != null) { attrStrArr.Add(skill.Description); attrStrArr.Add(Language.Get("equipQualityFormat", skill.SkillName) + skill.Description); } else { @@ -564,7 +565,7 @@ { //置灰 nameText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard63", i + 1)); descText.text = UIHelper.AppendColor(TextColType.NavyGray, string.Join(Language.Get("L1112"), attrStrArr)); descText.text = UIHelper.AppendColor(TextColType.NavyGray, UIHelper.RemoveColor(string.Join(Language.Get("L1112"), attrStrArr))); } } @@ -626,11 +627,6 @@ starUPBtnText.text = Language.Get("HeroGift7"); starUPBtn.SetInteractable(false); } else if (hero.IsFullStar()) { starUPBtnText.text = Language.Get("HeroGift3"); starUPBtn.SetInteractable(true); } else { starUPBtnText.text = Language.Get("HeroGift3"); @@ -659,6 +655,12 @@ void Wash() { if (hero.heroStar < HeroUIManager.Instance.canWashStarLevel) { SysNotifyMgr.Instance.ShowTip("HeroGift2", HeroUIManager.Instance.canWashStarLevel); return; } HeroUIManager.Instance.selectWashHeroGUID = hero.itemHero.guid; UIManager.Instance.OpenWindow<HeroGiftWashWin>(); @@ -698,14 +700,15 @@ } else if (type == 2) { awakeStr = SkillConfig.Get(config.SkillID).Description; var skill = SkillConfig.Get(config.SkillID); awakeStr = Language.Get("equipQualityFormat", skill.SkillName) + skill.Description; } else { for (int k = 0; k < config.AttrIDList.Length; k++) { awakeStr += PlayerPropertyConfig.GetFullDescription(config.AttrIDList[k], config.AttrValueList[k]) + (k == config.AttrIDList.Length - 1 ? "" : "\n"); awakeStr += PlayerPropertyConfig.GetFullDescription(config.AttrIDList[k], config.AttrValueList[k], "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}")) + (k == config.AttrIDList.Length - 1 ? "" : "\n"); } } @@ -718,8 +721,13 @@ { //置灰 nameText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard12", i) + Language.Get("L1096")); descText.text = UIHelper.AppendColor(TextColType.NavyGray, awakeStr); descText.text = UIHelper.AppendColor(TextColType.NavyGray, UIHelper.RemoveColor(awakeStr)); } } } void TeamPosChangeEvent(List<int> posList, int flyFrom, Vector3 startPos) { fightPowerText.text = UIHelper.ReplaceLargeArtNum(hero.CalculatePower()); } } Main/Utility/UIHelper.cs
@@ -1325,4 +1325,11 @@ return money / scale; } public static string RemoveColor(string content) { content = WordAnalysis.Color_Start_Regex.Replace(content, string.Empty); content = WordAnalysis.Color_End_Regex.Replace(content, string.Empty); return content; } }