From a178792731891bcd477ab0812ced1ab5fb9229fc Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 09 十月 2025 15:32:54 +0800
Subject: [PATCH] 125 战斗 闪避增加幻影

---
 Main/System/Battle/Motion/MotionBase.cs |   58 ++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/Main/System/Battle/Motion/MotionBase.cs b/Main/System/Battle/Motion/MotionBase.cs
index efaefc5..e4434f2 100644
--- a/Main/System/Battle/Motion/MotionBase.cs
+++ b/Main/System/Battle/Motion/MotionBase.cs
@@ -43,6 +43,9 @@
     #endregion
 
     private Spine.TrackEntry currentTrackEntry;
+
+    //  娈嬪奖鐢熸垚鍣�
+    private SkeletonIllusionShadow illusionShadow;
     
 
     #region 鍒濆鍖栨柟娉�
@@ -79,8 +82,8 @@
         {
             BattleDebug.LogError("缂哄皯SkeletonGraphic缁勪欢!");
         }
-        
 
+        illusionShadow = _skeletonAnimation.gameObject.AddMissingComponent<SkeletonIllusionShadow>();
     }
     
     public virtual void Release()
@@ -377,33 +380,34 @@
 
     public virtual void Run()
     {
-// #if UNITY_EDITOR
-//         List<int> removeIndex = new List<int>();
-// #endif
+        // #if UNITY_EDITOR
+        //         List<int> removeIndex = new List<int>();
+        // #endif
         for (int i = runActionList.Count - 1; i >= 0; i--)
         {
-// #if UNITY_EDITOR
-//             try
-//             {
-// #endif
-                runActionList[i]?.Invoke();
-// #if UNITY_EDITOR
-//             }
-//             catch (System.Exception ex)
-//             {
-//                 removeIndex.Add(i);
-//                 BattleDebug.LogError($"鎵цRunAction鏃跺彂鐢熷紓甯�: {ex.Message}\n{ex.StackTrace}");
-//             }
-// #endif
+            // #if UNITY_EDITOR
+            //             try
+            //             {
+            // #endif
+            runActionList[i]?.Invoke();
+            // #if UNITY_EDITOR
+            //             }
+            //             catch (System.Exception ex)
+            //             {
+            //                 removeIndex.Add(i);
+            //                 BattleDebug.LogError($"鎵цRunAction鏃跺彂鐢熷紓甯�: {ex.Message}\n{ex.StackTrace}");
+            //             }
+            // #endif
         }
 
-// #if UNITY_EDITOR
-//         // 绉婚櫎澶辫触鐨凙ction
-//         for (int i = 0; i < removeIndex.Count; i++)
-//         {
-//             runActionList.RemoveAt(removeIndex[i]);
-//         }
-// #endif
+        // #if UNITY_EDITOR
+        //         // 绉婚櫎澶辫触鐨凙ction
+        //         for (int i = 0; i < removeIndex.Count; i++)
+        //         {
+        //             runActionList.RemoveAt(removeIndex[i]);
+        //         }
+        // #endif
+        illusionShadow.Run();
     }
 
     public virtual void Pause()
@@ -432,6 +436,12 @@
         skeletonAnimation.timeScale = ratio;
     }
 
+    public void ShowIllusionShadow(bool v)
+    {
+        illusionShadow.SetSkeletonAnimation(skeletonAnimation);
+        illusionShadow.Show(v);
+    }
+
     #endregion
 
 }
\ No newline at end of file

--
Gitblit v1.8.0