Fix double click bug in PingClickHandler by clearing blinking flag early
This commit is contained in:
@@ -96,6 +96,10 @@ public class PingClickHandler : MonoBehaviour
|
||||
if (hit.collider != null && hit.collider.gameObject == gameObject)
|
||||
{
|
||||
Debug.Log($"[PingClick] Update手动射线贯穿点中 (使用相机: {c.name}): {name}");
|
||||
|
||||
// FIX BUG: Prevent multiple clicks in the same frame
|
||||
_isBlinking = false;
|
||||
|
||||
PerformClick();
|
||||
return;
|
||||
}
|
||||
@@ -106,12 +110,6 @@ public class PingClickHandler : MonoBehaviour
|
||||
|
||||
public void PerformClick()
|
||||
{
|
||||
if (!_isBlinking)
|
||||
{
|
||||
Debug.Log($"[PingClick] {name} 忽略点击,因为 _isBlinking=false");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_modelShown)
|
||||
{
|
||||
_modelShown = true;
|
||||
|
||||
Reference in New Issue
Block a user