hch
15 小时以前 2f844a7b0d694685557560e721eabd66ff830b7a
Main/System/Battle/UIComp/SkillTips.cs
@@ -6,9 +6,9 @@
public class SkillTips : MonoBehaviour
{
    public const float tweenDuration = 1f;
    public const float tweenDuration = 0.5f;
    public const float delayDuration = 0.4f;
    public const float delayDuration = 0.6f;
    public const float beginingX = 400f;
@@ -36,7 +36,7 @@
        imgIcon.sprite = UILoader.LoadSprite("HeroHead", teamHero.skinConfig.SquareIcon);
        imgSkillName.sprite = UILoader.LoadSprite("SkillNameIcon", skillConfig.SkillTipsName);
        imgSkillName.SetNativeSize();
        // 保证开始时所有图片为可见(alpha=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; }
@@ -65,6 +65,11 @@
                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);
                });
@@ -94,6 +99,11 @@
            tween3.Kill();
            tween3 = 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; }
    }
}