using UnityEngine; using System.Collections; using System; public class Click_yushe : MonoBehaviour { DateTime t1,t2; int i = 1; void OnMouseDown() { t2 = DateTime.Now; if (t2 - t1 < new TimeSpan(0, 0, 0, 0, 500)) { Debug.Log("哎呀竟然双击了好棒~~~~"); DestroyImmediate(this.gameObject); } t1 = t2; }
void OnMouseDrag() OnMouseExit()
{
}
}