39 lines
772 B
C#
39 lines
772 B
C#
using System;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using UnityEngine;
|
||
using UnityEngine.EventSystems;
|
||
|
||
/*xbb
|
||
* Í϶¯´°¿ÚUI
|
||
* */
|
||
public class WinDrag : MonoBehaviour, IPointerDownHandler, IPointerExitHandler, IPointerUpHandler
|
||
{
|
||
private bool isDrag = false;
|
||
|
||
void Update()
|
||
{
|
||
if (isDrag == true)
|
||
{
|
||
WindowsToolMgr.instance.Drag();
|
||
}
|
||
}
|
||
|
||
public void OnPointerExit(PointerEventData eventData)
|
||
{
|
||
isDrag = false;
|
||
WindowsToolMgr.instance.Drop();
|
||
}
|
||
|
||
public void OnPointerUp(PointerEventData eventData)
|
||
{
|
||
isDrag = false;
|
||
WindowsToolMgr.instance.Drop();
|
||
}
|
||
|
||
public void OnPointerDown(PointerEventData eventData)
|
||
{
|
||
isDrag = true;
|
||
}
|
||
}
|