You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
780 B
31 lines
780 B
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<WaterCurtainAttribute>().OpenAttributePanel(); |
|
} |
|
}
|
|
|