From fb0570bdb7e73e7d4dca211f365ee67b43628240 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 03 四月 2026 14:03:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into h5version
---
Main/System/Battle/UIComp/SkillTips.cs | 88 +++++---------------------------------------
1 files changed, 10 insertions(+), 78 deletions(-)
diff --git a/Main/System/Battle/UIComp/SkillTips.cs b/Main/System/Battle/UIComp/SkillTips.cs
index ac68de4..725489e 100644
--- a/Main/System/Battle/UIComp/SkillTips.cs
+++ b/Main/System/Battle/UIComp/SkillTips.cs
@@ -13,10 +13,10 @@
public const float beginingX = 400f;
- [SerializeField]public Image imgIcon;
+ [SerializeField] public Image imgIcon;
- [SerializeField]public Image imgSkillName;
-
+ [SerializeField] public GradientText txtSkillName;
+ [SerializeField] public CanvasGroup canvasGroup;
[SerializeField] public Image imageBg;
private Tween tween1;
@@ -36,18 +36,12 @@
KillAllTweens();
UILoader.LoadSprite("HeroHead", teamHero.skinConfig.SquareIcon, imgIcon).Forget();
- UILoader.LoadSprite("SkillNameIcon", skillConfig.SkillTipsName, imgSkillName).ContinueWith(() =>
- {
- if (this == null || imgSkillName == null)
- {
- return;
- }
- imgSkillName.SetNativeSize();
- }).Forget();
+ txtSkillName.text = skillConfig.SkillName;
+
// 淇濊瘉寮�濮嬫椂鎵�鏈夊浘鐗囦负鍙锛坅lpha=1锛�
if (imageBg != null) { var c = imageBg.color; c.a = 1f; imageBg.color = c; }
if (imgIcon != null) { var c = imgIcon.color; c.a = 1f; imgIcon.color = c; }
- if (imgSkillName != null) { var c = imgSkillName.color; c.a = 1f; imgSkillName.color = c; }
+ if (canvasGroup != null) { var c = canvasGroup.alpha; c = 1f; canvasGroup.alpha = c; }
gameObject.SetActive(true);
float posY = transform.localPosition.y;
@@ -66,8 +60,8 @@
seq.Join(imageBg.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
if (imgIcon != null)
seq.Join(imgIcon.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
- if (imgSkillName != null)
- seq.Join(imgSkillName.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
+ if (canvasGroup != null)
+ seq.Join(canvasGroup.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
seq.OnComplete(() =>
{
@@ -75,7 +69,7 @@
// 鎭㈠鍥剧墖 alpha锛屼繚璇佷笅娆℃樉绀烘椂鍙
if (imageBg != null) { var cc = imageBg.color; cc.a = 1f; imageBg.color = cc; }
if (imgIcon != null) { var cc = imgIcon.color; cc.a = 1f; imgIcon.color = cc; }
- if (imgSkillName != null) { var cc = imgSkillName.color; cc.a = 1f; imgSkillName.color = cc; }
+ if (canvasGroup != null) { var cc = canvasGroup.alpha; cc = 1f; canvasGroup.alpha = cc; }
transform.localPosition = isRed ? new Vector3(-beginingX, posY, 0f) : new Vector3(beginingX, posY, 0f);
gameObject.SetActive(false);
@@ -89,68 +83,6 @@
battleField.battleTweenMgr.OnPlayTween(tween1);
}
- public async UniTask PlayMotionAsync(BattleField battleField, bool isRed, TeamHero teamHero, SkillConfig skillConfig)
- {
- if (teamHero == null || skillConfig == null)
- {
- return;
- }
-
- if (skillConfig.FuncType != 2)
- return;
-
- KillAllTweens();
-
- imgIcon.sprite = await UILoader.LoadSpriteAsync("HeroHead", teamHero.skinConfig.SquareIcon);
- if (this == null) return;
- imgSkillName.sprite = await UILoader.LoadSpriteAsync("SkillNameIcon", skillConfig.SkillTipsName);
- if (this == null) return;
- imgSkillName.SetNativeSize();
- // 淇濊瘉寮�濮嬫椂鎵�鏈夊浘鐗囦负鍙锛坅lpha=1锛�
- if (imageBg != null) { var c = imageBg.color; c.a = 1f; imageBg.color = c; }
- if (imgIcon != null) { var c = imgIcon.color; c.a = 1f; imgIcon.color = c; }
- if (imgSkillName != null) { var c = imgSkillName.color; c.a = 1f; imgSkillName.color = c; }
-
- gameObject.SetActive(true);
- float posY = transform.localPosition.y;
- transform.localPosition = isRed ? new Vector3(-beginingX, posY, 0f) : new Vector3(beginingX, posY, 0f);
- tween1 = transform.DOLocalMoveX(0, tweenDuration / battleField.speedRatio, false).SetEase(Ease.Linear).OnComplete(() =>
- {
- tween1 = null;
- tween3 = DOVirtual.DelayedCall(delayDuration / battleField.speedRatio, () =>
- {
- tween3 = null;
-
- // tween2 鏀逛负鍋氬噺娣★紙瀵� imageBg銆乮mgIcon銆乮mgSkillName 鍚屾娣″嚭锛�
- float fadeDuration = tweenDuration / battleField.speedRatio;
- Sequence seq = DOTween.Sequence();
- if (imageBg != null)
- seq.Join(imageBg.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
- if (imgIcon != null)
- seq.Join(imgIcon.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
- if (imgSkillName != null)
- seq.Join(imgSkillName.DOFade(0f, fadeDuration).SetEase(Ease.InQuad));
-
- seq.OnComplete(() =>
- {
- tween2 = null;
- // 鎭㈠鍥剧墖 alpha锛屼繚璇佷笅娆℃樉绀烘椂鍙
- if (imageBg != null) { var cc = imageBg.color; cc.a = 1f; imageBg.color = cc; }
- if (imgIcon != null) { var cc = imgIcon.color; cc.a = 1f; imgIcon.color = cc; }
- if (imgSkillName != null) { var cc = imgSkillName.color; cc.a = 1f; imgSkillName.color = cc; }
-
- transform.localPosition = isRed ? new Vector3(-beginingX, posY, 0f) : new Vector3(beginingX, posY, 0f);
- gameObject.SetActive(false);
- });
-
- tween2 = seq;
- battleField.battleTweenMgr.OnPlayTween(tween2);
- });
- battleField.battleTweenMgr.OnPlayTween(tween3);
- });
- battleField.battleTweenMgr.OnPlayTween(tween1);
- }
-
public void KillAllTweens()
{
if (tween1 != null)
@@ -172,7 +104,7 @@
// 琚己鍒跺仠姝㈡椂涔熼渶瑕佹仮澶� alpha
if (imageBg != null) { var cc = imageBg.color; cc.a = 1f; imageBg.color = cc; }
if (imgIcon != null) { var cc = imgIcon.color; cc.a = 1f; imgIcon.color = cc; }
- if (imgSkillName != null) { var cc = imgSkillName.color; cc.a = 1f; imgSkillName.color = cc; }
+ if (canvasGroup != null) { var cc = canvasGroup.alpha; cc = 1f; canvasGroup.alpha = cc; }
}
}
--
Gitblit v1.8.0