using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using AX.MessageSystem; public class ObjDoubleClick : MonoBehaviour { private DateTime t1, t2; private void OnMouseDown() { t2 = DateTime.Now; if (t2 - t1 < new TimeSpan(0, 0, 0, 0, 400) && !EventSystem.current.IsPointerOverGameObject()) { if (ReplaySetting.PlayStatus == PlayStatus.isReplay) return; ClickFunc(); } t1 = t2; } public virtual void ClickFunc() { MessageDispatcher.SendMessage("CANCEL_CLONEBTN_SELECTED_COMMAND"); } }