From 537670a1e4dbdf26af45356a2f01c69a8d7dfee7 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 02 九月 2025 14:53:09 +0800
Subject: [PATCH] 50 【主界面】核心主体 - 主界面装备特效

---
 Main/System/Equip/EquipCell.cs             |   30 ++++++++------
 Main/Component/UI/Effect/UIEffectPlayer.cs |   11 ++---
 Main/System/MainLevel/MainBossEnterWin.cs  |    2 
 Main/Component/UI/Effect/EffectPlayer.cs   |   28 ++++++++-----
 4 files changed, 40 insertions(+), 31 deletions(-)

diff --git a/Main/Component/UI/Effect/EffectPlayer.cs b/Main/Component/UI/Effect/EffectPlayer.cs
index 22b7ab3..b187168 100644
--- a/Main/Component/UI/Effect/EffectPlayer.cs
+++ b/Main/Component/UI/Effect/EffectPlayer.cs
@@ -167,7 +167,7 @@
         Clear();
     }
 
-    public virtual void Play(bool showLog = true)
+    public virtual void Play(bool showLog = true, bool closePMA = false)
     {
         isPlaying = true;
         if (!isInit)
@@ -186,15 +186,17 @@
             //闃茶寖effeid 涓�0
             if (effectConfig != null && effectConfig.isSpine != 0)
             {
-                PlaySpineEffect();
+                PlaySpineEffect(closePMA);
             }
             return;
         }
+        if (effectConfig == null)
+            return;
 
         if (EffectMgr.IsNotShowBySetting(effectId))
-        {
-            return;
-        }
+            {
+                return;
+            }
 
         if (null != effectTarget)
         {
@@ -211,7 +213,7 @@
         // 鍔犺浇spine鐗规晥璧勬簮
         if (effectConfig.isSpine != 0)
         {
-            PlaySpineEffect();
+            PlaySpineEffect(closePMA);
         }
         else
         {
@@ -240,7 +242,7 @@
 
 
 
-    protected void PlaySpineEffect()
+    protected void PlaySpineEffect(bool closePMA = false)
     {
 
         // 浠庣壒鏁堥鍒朵綋姹犺幏鍙栫壒鏁�
@@ -253,7 +255,7 @@
         {
             //LoadAsset 宸茬粡鏈夌紦瀛楽keletonDataAsset
             spineComp.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("UIEffect/" + effectConfig.packageName, effectConfig.fxName);
-
+            spineComp.MeshGenerator.settings.pmaVertexColors = !closePMA;   //涓簍rue鏃朵細鏈夐儴鍒嗙壒鏁堜笉鏄剧ず 濡備富鐣岄潰瑁呭鐗规晥
             spineComp.raycastTarget = false;
             spineComp.Initialize(true);
             spineComp.timeScale = speedRate;
@@ -282,13 +284,17 @@
         // 鎾斁鎸囧畾鍔ㄧ敾
     void PlayerTheSpineAnim()
     {
-
         spineComp.enabled = true;
         var skeletonData = spineComp.Skeleton.Data;
         if (skeletonData.Animations.Count > 0)
         {
             //鎸夐厤缃垨鑰呴粯璁ょ涓�涓�
             int defaultAnimIndex = Math.Max(0, effectConfig.animIndex.Length == 0 ? 0 : effectConfig.animIndex[0]);
+            if (playSpineAnimIndex >= skeletonData.Animations.Count)
+            {
+                playSpineAnimIndex = -1;
+                Debug.LogError("鐗规晥锛�" + effectConfig.id + " 绱㈠紩瓒呭嚭鎾斁榛樿鍔ㄧ敾銆� error锛�" + playSpineAnimIndex);
+            }
             string defaultAnimationName = skeletonData.Animations.Items[playSpineAnimIndex == -1 ? defaultAnimIndex : playSpineAnimIndex].Name;
             spineAnimationState.SetAnimation(0, defaultAnimationName, isPlaySpineLoop);
         }
@@ -365,12 +371,12 @@
         }
     }
 
-    public async UniTask PlayAsync(bool showLog = true)
+    public async UniTask PlayAsync(bool showLog = true, bool closePMA = false)
     {
         await UniTask.Delay(playDelayTime);
         try
         {
-            Play(showLog);
+            Play(showLog, closePMA);
         }
         catch (Exception e)
         {
diff --git a/Main/Component/UI/Effect/UIEffectPlayer.cs b/Main/Component/UI/Effect/UIEffectPlayer.cs
index 5644c6f..a7aba56 100644
--- a/Main/Component/UI/Effect/UIEffectPlayer.cs
+++ b/Main/Component/UI/Effect/UIEffectPlayer.cs
@@ -12,20 +12,20 @@
 public class UIEffectPlayer : EffectPlayer
 {
 
-    
+
     //spine閲岀殑绗嚑涓姩鐢�
-    public void Play(int index, bool showLog = true)
+    public void Play(int index, bool showLog = true, bool closePMA = false)
     {
         playSpineAnimIndex = index;
-        PlayAsync(showLog).Forget();
+        PlayAsync(showLog, closePMA).Forget();
     }
 
     //閰嶇疆鍔ㄧ敾缁勬暟缁勭储寮�
-    public void PlayByArrIndex(int index, bool showLog = true)
+    public void PlayByArrIndex(int index, bool showLog = true, bool closePMA = false)
     {
         var config = EffectConfig.Get(effectId);
         playSpineAnimIndex = config.animIndex[index];
-        PlayAsync(showLog).Forget();
+        PlayAsync(showLog, closePMA).Forget();
     }
 
 
@@ -48,6 +48,5 @@
         effectPlayer.SetActive(true);
         return effectPlayer;
     }
-
 
 }
diff --git a/Main/System/Equip/EquipCell.cs b/Main/System/Equip/EquipCell.cs
index d3e22a2..af8ffd6 100644
--- a/Main/System/Equip/EquipCell.cs
+++ b/Main/System/Equip/EquipCell.cs
@@ -56,19 +56,23 @@
         if (lvText != null)
             lvText.text = Language.Get("L1113", EquipModel.Instance.GetEquipLV(equip));
 
-        if (uieff == null)
-        { 
-            //绛夌編鏈彁渚涜澶囩殑鏁堟灉鐗规晥锛堥渶瑕佺壒鏁堝浘锛�
-            // int effectID = EquipModel.Instance.equipUIEffects[Math.Min(equip.config.ItemColor, EquipModel.Instance.equipUIEffects.Length) - 1];
-            // if (effectID == 0)
-            // {
-            //     uieff.Stop();
-            // }
-            // else
-            // {
-            //     uieff.effectId = effectID;
-            //     uieff.Play();
-            // }
+
+        
+        if (uieff != null)
+        {
+            if (equip.config.ItemColor >= 7)
+            {
+                uieff.effectId = 1026;
+
+                uieff.PlayByArrIndex(equip.config.ItemColor - 7, true, true);
+            }
+            else
+            {
+                uieff.Stop();
+            }
+            //鐗规晥鍙傝�冨昂瀵�106*150 鍚屾瘮渚嬬缉鏀�
+            var rect = this.transform.GetComponent<RectTransform>();
+            uieff.transform.localScale = new Vector3(rect.sizeDelta.x / 106f, rect.sizeDelta.y / 150f, 1);
         }
     }
 
diff --git a/Main/System/MainLevel/MainBossEnterWin.cs b/Main/System/MainLevel/MainBossEnterWin.cs
index 9d7350d..5f7ff91 100644
--- a/Main/System/MainLevel/MainBossEnterWin.cs
+++ b/Main/System/MainLevel/MainBossEnterWin.cs
@@ -89,7 +89,7 @@
                 int skillID = lineUPConfig.SkillIDExList[i];
                 skillWordCells[i].Init(skillID, () =>
                 {
-                    SmallTipWin.showText = SkillConfig.Get(skillID)?.Description;
+                    SmallTipWin.showText = Language.Get("SmallTipFomat",SkillConfig.Get(skillID)?.SkillName, SkillConfig.Get(skillID)?.Description) ;
                     SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
                     SmallTipWin.isDownShow = true;
                     UIManager.Instance.OpenWindow<SmallTipWin>();

--
Gitblit v1.8.0