fix: prevent repeated clicks breaking undo stack and properly hide chanrao on undo

This commit is contained in:
yangbear
2026-07-09 03:41:50 +08:00
parent 3826a8b3bb
commit 14b03b5859
3 changed files with 4 additions and 0 deletions
@@ -63,6 +63,7 @@ public class ChanraoTuibuHandler : MonoBehaviour
public void PerformClick()
{
if (!_isBlinking) return; // 防止重复点击
Debug.Log($"[ChanraoTuibu] {name} 被点击");
ActionHistory.Push(ActionHistory.ActionType.ChanraoTuibu, this);
_isBlinking = false;
@@ -58,6 +58,7 @@ public class PingClickHandler : MonoBehaviour
public void PerformClick()
{
if (!_isBlinking) return; // 防止重复点击
foreach (var c in Object.FindObjectsOfType<Camera>())
{
if (!c.enabled) continue;
@@ -125,6 +126,7 @@ public class PingClickHandler : MonoBehaviour
public void ReEnableBorder() { _isBlinking = true; if (_outlineMesh != null) { _outlineMesh.enabled = true; StopAllCoroutines(); StartCoroutine(BlinkOutline()); } }
public void UndoSecondClick()
{
if (chanraoObject != null) chanraoObject.SetActive(false);
ShowSelf();
_modelShown = true;
_isBlinking = false;
@@ -58,6 +58,7 @@ public class TouchPositionHandler : MonoBehaviour
private void OnMouseDown()
{
if (_meshRenderer == null || !_meshRenderer.enabled) return; // 防止重复点击
Debug.Log($"[TouchPosition] {name}: 被点击");
if (womanObject != null && targetPosition != null)