31 lines
651 B
C#
31 lines
651 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class MoverSettingsPanel : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
|
{
|
|
|
|
public float touchdownTimer =0f;
|
|
public void OnPointerDown(PointerEventData eventData)
|
|
{
|
|
touchdownTimer =0f;
|
|
}
|
|
|
|
public void OnPointerUp(PointerEventData eventData)
|
|
{
|
|
if(touchdownTimer > 2){
|
|
settingsPanel.SetActive(true);
|
|
}
|
|
}
|
|
|
|
public GameObject settingsPanel;
|
|
|
|
void Update()
|
|
{
|
|
if(touchdownTimer < 3f){
|
|
touchdownTimer +=Time.deltaTime;
|
|
}
|
|
}
|
|
}
|