using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class CurtainLineItem : CloneGameObjInfo { public Vector3 prePos; public Vector3 curPos; private DateTime t2; private DateTime t1; public void OnMouseDown() { if (!EventSystem.current.IsPointerOverGameObject()) { t2 = DateTime.Now; if (t2 - t1 < new TimeSpan(0, 0, 0, 0, 500)) { StartCoroutine(OpenAttributePanel()); } t1 = t2; } } IEnumerator OpenAttributePanel() { yield return new WaitForSeconds(0.1f); transform.parent.GetComponent().OpenAttributePanel(); } }