From d3db73d271055c09159f85a4baf3088c1c35c99c Mon Sep 17 00:00:00 2001 From: yangbear Date: Sun, 12 Jul 2026 06:28:31 +0800 Subject: [PATCH] Fix ResetState for ShoseClickHandler to properly show outline and reset related objects --- .../Scripts/Interaction/ShoseClickHandler.cs | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/Interaction/ShoseClickHandler.cs b/Assets/Scripts/Interaction/ShoseClickHandler.cs index 8ca12b1..19ca35b 100644 --- a/Assets/Scripts/Interaction/ShoseClickHandler.cs +++ b/Assets/Scripts/Interaction/ShoseClickHandler.cs @@ -136,8 +136,6 @@ public class ShoseClickHandler : MonoBehaviour { touchPoint3.gameObject.SetActive(false); } - - } // 切换到摄像机3(已由 PageController 开场动画结束时完成,此处不再重复触发) @@ -158,6 +156,8 @@ public class ShoseClickHandler : MonoBehaviour public void ResetState() { _clicked = false; + + // 【关键修复】确保 OutlineMesh 在重新激活时处于开启状态并正常闪烁 if (_outlineMesh != null) _outlineMesh.enabled = true; if (_hasRecordedInitialTransform) @@ -175,8 +175,6 @@ public class ShoseClickHandler : MonoBehaviour uiMgr.HideVideo(); } - - // 把 woman 重置(取消蹲下) var woman = GameObject.Find("woman"); if (woman != null) @@ -185,12 +183,37 @@ public class ShoseClickHandler : MonoBehaviour if (anim != null) { anim.SetBool("isCrouch", false); - - } - // 移回原位?如果最初在某个位置,PageController里有记录。这里只要不穿帮即可 + // 还需要把女人放回到 point2 处 + var point2 = GameObject.Find("womanPointArray/point2"); + if (point2 != null) + { + woman.transform.position = point2.transform.position; + woman.transform.rotation = point2.transform.rotation; + } + } + + // 取消男伤员的 CheckFoot 动作 + var manInjury = GameObject.Find("manInjury"); + if (manInjury != null) + { + var anim = manInjury.GetComponent(); + if (anim != null) + { + anim.SetBool("CheckFoot", false); + } + } + + // 【关键修复】把原本被隐藏的 touchArray/point3 的边框重新显示出来 + var touchArray = GameObject.Find("touchArray"); + if (touchArray != null) + { + var touchPoint3 = touchArray.transform.Find("point3"); + if (touchPoint3 != null) + { + touchPoint3.gameObject.SetActive(true); + } } - // ---------------------------------------- StopAllCoroutines(); StartCoroutine(BlinkOutline());