22 lines
590 B
C#
Raw Normal View History

2021-03-25 16:55:36 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class MapListScript : MonoBehaviour, IEndDragHandler
{
public void OnEndDrag(PointerEventData eventData)
{
var sc = gameObject.transform.parent.GetComponent<MapListController>();
2021-03-25 16:55:36 +08:00
if (eventData.position.y < 0)
{
sc.Refresh();
}
if (eventData.position.y + Screen.height > sc.Content.GetComponent<RectTransform>().rect.height)
{
sc.pageIndex++;
sc.GetList();
}
}
}