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>();
        if (eventData.position.y < 0) 
        {
            sc.Refresh();
        }
        if (eventData.position.y + Screen.height > sc.Content.GetComponent<RectTransform>().rect.height) 
        {
            sc.pageIndex++;
            sc.GetList();
        }
    }
}
