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.
27 lines
677 B
27 lines
677 B
4 years ago
|
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");
|
||
|
}
|
||
|
}
|