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)
|
|
|
|
|
|
{
|
2021-03-30 14:14:24 +08:00
|
|
|
|
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();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|