From f4a702e212d1853735f8dae399da69d23bfa510e Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 18:16:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into h5version
---
Main/System/Main/HeroFightingCardCell.cs | 86 ++++++------------------------------------
1 files changed, 13 insertions(+), 73 deletions(-)
diff --git a/Main/System/Main/HeroFightingCardCell.cs b/Main/System/Main/HeroFightingCardCell.cs
index 1981f33..1a797c7 100644
--- a/Main/System/Main/HeroFightingCardCell.cs
+++ b/Main/System/Main/HeroFightingCardCell.cs
@@ -1,7 +1,6 @@
锘縰sing UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
-using Cysharp.Threading.Tasks;
//涓荤晫闈㈠崱鐗�
public class HeroFightingCardCell : MonoBehaviour
@@ -24,6 +23,7 @@
[SerializeField] Image emptyLockImg;
[SerializeField] Image redPointImg;
[SerializeField] UIEffectPlayer unlockEffect;
+ [SerializeField] GameObject onTip; //涓婇樀鎻愮ず
void OnEnable()
{
@@ -64,85 +64,26 @@
redPointImg.SetActive(HeroUIManager.Instance.CanUnLock(HeroUIManager.Instance.lockIndexList[lockIndex]));
}
}
-
- return;
- }
- else
- {
- clickHeroBtn.SetActive(true);
- clickEmptyBtn.SetActive(false);
- }
-
- var hero = HeroManager.Instance.GetHero(guid);
- var heroID = hero.heroId;
- var star = hero.heroStar;
- clickHeroBtn.AddListener(ClickHero);
- var heroConfig = HeroConfig.Get(heroID);
- qualityBG.SetSprite("herocBG" + heroConfig.Quality);
-
- UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(hero.SkinID).RectangleIcon, heroIcon, "herohead_big_default").Forget();
-
-
- if (star == 0)
- {
- starRect.SetActive(false);
- }
- else
- {
- starRect.SetActive(true);
- for (int i = 0; i < starsImg.Count; i++)
+ if (onTip != null)
{
- if ((star - 1) % starsImg.Count >= i)
+ if (PlayerDatas.Instance.baseData.ExAttr1 / 100 < 601 && HeroManager.Instance.GetHeroCount() > index && index < 3)
{
- starsImg[i].SetActive(true);
- starsImg[i].SetSprite("herostar" + (((star - 1) / starsImg.Count) + 1) * starsImg.Count);
+ //鏂版墜鏈� 鍙兘鍥犱负涓�浜涙搷浣滃師鍥犳病涓婇樀鑻遍泟
+ onTip.SetActive(true);
}
else
{
- starsImg[i].SetActive(false);
+ onTip.SetActive(false);
}
}
- }
-
- countryImg.SetSprite(HeroUIManager.Instance.GetCountryIconName(heroConfig.Country));
- lvText.text = hero.heroLevel == 0 ? "" : Language.Get("L1094") + hero.heroLevel;
-
- // RefreshFightIng(false);
-
- }
-
- public async UniTask DisplayAsync(int index, List<TeamHero> heros)
- {
- 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
{
+ if (onTip != null)
+ {
+ onTip.SetActive(false);
+ }
clickHeroBtn.SetActive(true);
clickEmptyBtn.SetActive(false);
}
@@ -154,8 +95,7 @@
var heroConfig = HeroConfig.Get(heroID);
qualityBG.SetSprite("herocBG" + heroConfig.Quality);
- var sprite = await UILoader.LoadSpriteAsync("HeroHead", HeroSkinConfig.Get(hero.SkinID).RectangleIcon);
- if (this == null) return;
+ var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(hero.SkinID).RectangleIcon);
if (sprite == null)
{
// 鍐呯綉鏈厤缃椂
@@ -199,7 +139,7 @@
{
HeroUIManager.Instance.SortHeroList();
HeroUIManager.Instance.selectHeroGuid = guid;
- UIManager.Instance.OpenWindowAsync<HeroTrainWin>().Forget();
+ UIManager.Instance.OpenWindow<HeroTrainBaseWin>();
}
void ClickEmpty()
@@ -218,7 +158,7 @@
}
return;
}
- UIManager.Instance.OpenWindowAsync<HeroPosWin>().Forget();
+ UIManager.Instance.OpenWindow<HeroPosWin>();
}
void OnSkillCast(bool isfighting)
{
--
Gitblit v1.8.0