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.
23 lines
626 B
23 lines
626 B
3 years ago
|
using AX.MessageSystem;
|
||
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.EventSystems;
|
||
|
//Author:YHD
|
||
|
public class DoubleClick : MonoBehaviour {
|
||
|
private DateTime t1, t2;
|
||
|
|
||
|
void OnMouseDown()
|
||
|
{
|
||
|
LineamentEvent.gameobj = transform.parent.gameObject;
|
||
|
t2 = DateTime.Now;
|
||
|
if (t2 - t1 < new TimeSpan(0, 0, 0, 0, 400) && !EventSystem.current.IsPointerOverGameObject())
|
||
|
{
|
||
|
MessageDispatcher.SendMessage("DoubleClick", (object)(transform.parent.name + gameObject.name));
|
||
|
}
|
||
|
t1 = t2;
|
||
|
}
|
||
|
|
||
|
}
|