From 09bc892c7283df8757a07b646d5af21ddaa263d1 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 06 十一月 2025 18:22:34 +0800
Subject: [PATCH] 164 天子的考验-客户端
---
Main/System/Main/HeroFightingCardCell.cs | 42 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/Main/System/Main/HeroFightingCardCell.cs b/Main/System/Main/HeroFightingCardCell.cs
index 1108afd..410c72c 100644
--- a/Main/System/Main/HeroFightingCardCell.cs
+++ b/Main/System/Main/HeroFightingCardCell.cs
@@ -17,7 +17,9 @@
[SerializeField] FillTween cdTween;
[SerializeField] Button clickEmptyBtn;
-
+ [SerializeField] Image emptyLockImg;
+ [SerializeField] Image redPointImg;
+ [SerializeField] UIEffectPlayer unlockEffect;
void OnEnable()
{
@@ -30,16 +32,35 @@
}
string guid;
- public void Display(int index)
+ int lockIndex;
+ public void Display(int index, List<TeamHero> heros)
{
- var team = TeamManager.Instance.GetTeam(TeamType.Story);
- var teamHero = team.GetServerHeroByIndex(index);
+ TeamHero teamHero = null;
+ if (index < heros.Count)
+ {
+ teamHero = heros[index];
+ }
guid = teamHero != null ? teamHero.guid : "";
if (guid == "")
{
clickHeroBtn.SetActive(false);
clickEmptyBtn.SetActive(true);
clickEmptyBtn.AddListener(ClickEmpty);
+ emptyLockImg.SetActive(false);
+ redPointImg.SetActive(false);
+
+ int lockCnt = HeroUIManager.Instance.lockIndexList.Count;
+ //鏍规嵁閿佹暟閲� 鍊掑簭鍒ゆ柇閿佷綇
+ if (lockCnt > 0)
+ {
+ lockIndex = lockCnt - (TeamConst.MaxTeamHeroCount - 1 - index) - 1;
+ if (lockIndex >= 0 && lockIndex < lockCnt)
+ {
+ emptyLockImg.SetActive(true);
+ redPointImg.SetActive(HeroUIManager.Instance.CanUnLock(HeroUIManager.Instance.lockIndexList[lockIndex]));
+ }
+ }
+
return;
}
else
@@ -106,6 +127,19 @@
void ClickEmpty()
{
+ if (emptyLockImg.isActiveAndEnabled)
+ {
+ if (HeroUIManager.Instance.UnLockHeroCnt(lockIndex))
+ {
+ unlockEffect.onComplete = () =>
+ {
+ HeroUIManager.Instance.OnUnLockHeroCountEvent?.Invoke();
+ SysNotifyMgr.Instance.ShowTip("HeroCountUnLock5", TeamConst.MaxTeamHeroCount - HeroUIManager.Instance.lockIndexList.Count);
+ };
+ unlockEffect.Play();
+ }
+ return;
+ }
UIManager.Instance.OpenWindow<HeroCallWin>();
}
void OnSkillCast(bool isfighting)
--
Gitblit v1.8.0