_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/snailFactory/PointFollow.cs

20 lines
404 B
C#
Raw Normal View History

2024-12-08 20:16:04 +08:00
using UnityEngine;
using UnityEngine.EventSystems;
public class PointFollow : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
{
public void OnBeginDrag(PointerEventData eventData)
{
}
public void OnDrag(PointerEventData eventData)
{
transform.position = eventData.position;
}
public void OnEndDrag(PointerEventData eventData)
{
}
}