28 lines
645 B
C#
28 lines
645 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using UnityEngine.EventSystems;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ťԤ<C5A5><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD>UI<55>ᴩ<E1B4A9><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public class BtnPreHandler3 : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
|||
|
|
{
|
|||
|
|
public void OnPointerDown(PointerEventData eventData)
|
|||
|
|
{
|
|||
|
|
ModelController.CanControl = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void OnPointerUp(PointerEventData eventData)
|
|||
|
|
{
|
|||
|
|
Invoke("EnableClick", 0.2f);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void EnableClick()
|
|||
|
|
{
|
|||
|
|
if (!ModelController.CanControl)
|
|||
|
|
{
|
|||
|
|
ModelController.CanControl = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|