From f117a66e56b184cbac53b279a7cfca8b7e9409be Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 11 十二月 2025 10:25:51 +0800
Subject: [PATCH] 125 战斗 复活相关前端表现
---
Main/System/Battle/Motion/MotionBase.cs | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/Main/System/Battle/Motion/MotionBase.cs b/Main/System/Battle/Motion/MotionBase.cs
index 46a2b4e..dca0851 100644
--- a/Main/System/Battle/Motion/MotionBase.cs
+++ b/Main/System/Battle/Motion/MotionBase.cs
@@ -540,6 +540,7 @@
resumeTime = Time.time;
}
+ // 鍘熸湁鐨� HaveRest 淇濇寔涓嶅彉锛岀敤浜庝竴鑸殑閲嶇疆
public void HaveRest()
{
animState?.ClearTracks();
@@ -564,6 +565,60 @@
PlayAnimation(MotionName.idle, true);
}
+ // 鏂板锛氫笓闂ㄧ敤浜庡娲荤殑瀹屾暣閲嶇疆鏂规硶
+ public void ResetForReborn()
+ {
+ // 1. 娓呯悊鎵�鏈夊姩鐢昏建閬擄紙鍖呮嫭姝讳骸鍔ㄧ敾鐨勮建閬�9锛�
+ animState?.ClearTracks();
+
+ // 2. 娓呯悊鎵�鏈夊洖璋冨拰鍔ㄤ綔闃熷垪
+ trackEntryCallbacks.Clear();
+ runningActions.Clear();
+ activeSkillTracks.Clear();
+
+ // 3. 閲嶇疆瀛愭妧鑳借建閬撴睜
+ if (availableSubTracks == null)
+ availableSubTracks = new Queue<int>();
+ else
+ availableSubTracks.Clear();
+
+ subSkillTrackMap.Clear();
+ for (int i = 1; i <= 8; i++)
+ availableSubTracks.Enqueue(i);
+
+ // 4. 娓呯┖杞ㄩ亾寮曠敤
+ currentTrack = null;
+
+ // 5. 閲嶇疆鎵�鏈夌姸鎬佹爣蹇�
+ playingSkillAnim = false;
+ isUnderControl = false;
+
+ // 6. 閲嶇疆鏃堕棿鐩稿叧瀛楁锛堝叧閿紒锛�
+ pauseTime = 0f;
+ resumeTime = 0f;
+ pausedAccumulated = 0f;
+ pauseStart = 0f;
+
+ // 7. 閲嶇疆鏃堕棿缂╂斁涓烘甯搁�熷害
+ MotionTimeScale = 1f;
+ if (skeletonAnim != null)
+ skeletonAnim.timeScale = MotionTimeScale;
+
+ // 8. 娓呯悊娈嬪奖鏁堟灉
+ if (illusionShadow != null)
+ illusionShadow.Show(false);
+
+ // 9. 閲嶇疆楠ㄩ鍒板垵濮嬪Э鎬侊紙鍏抽敭锛侀槻姝㈡浜″Э鎬佹畫鐣欙級
+ if (skeleton != null)
+ {
+ skeleton.SetToSetupPose();
+ // skeleton.UpdateWorldTransform();
+ }
+
+ // 10. 鎾斁寰呮満鍔ㄧ敾
+ PlayAnimation(MotionName.idle, true);
+ }
+
public void SetSpeedRatio(float ratio)
{
MotionTimeScale = ratio;
@@ -579,9 +634,4 @@
}
}
- internal void ResetToIdleAnimation()
- {
- // 娓呯┖涔嬪墠鐨勭姸鎬�
- HaveRest();
- }
}
\ No newline at end of file
--
Gitblit v1.8.0