From c3525dadcaa037816b654a6bb706284bbbf51af3 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期四, 11 九月 2025 17:50:22 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts --- Main/System/HeroUI/HeroCardCell.cs | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Main/System/HeroUI/HeroCardCell.cs b/Main/System/HeroUI/HeroCardCell.cs index dac5741..0f5d634 100644 --- a/Main/System/HeroUI/HeroCardCell.cs +++ b/Main/System/HeroUI/HeroCardCell.cs @@ -12,6 +12,7 @@ [SerializeField] UIHeroController heroModel; [SerializeField] Image onStateImg; [SerializeField] RedpointBehaviour redpoint; + [SerializeField] Image newImage; //鏂版爣璇嗗拰绾㈢偣浜掓枼 [SerializeField] Image trainStateImg; [SerializeField] Text nameText; [SerializeField] Image awakeImg; @@ -38,12 +39,23 @@ 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; + int teamPos = TeamManager.Instance.GetTeam(TeamType.Story).GetPosition(hero.itemHero.guid); + if (teamPos >= 0) + { + redpoint.redpointId = MainRedDot.HeroCardRedpoint * 10 + teamPos; + newImage.SetActive(false); + } + else + { + redpoint.redpointId = 0; + newImage.SetActive(HeroUIManager.Instance.newHeroIDList.Contains(hero.heroId)); + } + + var funcState = HeroUIManager.Instance.GetFuncState(hero); if (funcState > 0) { trainStateImg.SetActive(true); - trainStateImg.SetSprite("herofuncstate" + hero.funcState); + trainStateImg.SetSprite("herofuncstate" + funcState); } else { -- Gitblit v1.8.0