2017-08-02 17:21:45 +08:00
|
|
|
|
using UnityEngine.EventSystems;
|
2017-07-30 20:13:29 +08:00
|
|
|
|
|
2017-08-02 17:21:45 +08:00
|
|
|
|
namespace UnityEngine.UI.Extensions.Examples
|
2017-07-30 20:13:29 +08:00
|
|
|
|
{
|
2017-08-02 17:21:45 +08:00
|
|
|
|
public class PaginationScript : MonoBehaviour, IPointerClickHandler
|
2017-07-30 20:13:29 +08:00
|
|
|
|
{
|
2017-08-02 17:21:45 +08:00
|
|
|
|
public HorizontalScrollSnap hss;
|
|
|
|
|
public int Page;
|
|
|
|
|
|
|
|
|
|
public void OnPointerClick(PointerEventData eventData)
|
2017-07-30 20:13:29 +08:00
|
|
|
|
{
|
2017-08-02 17:21:45 +08:00
|
|
|
|
if (hss != null)
|
|
|
|
|
{
|
|
|
|
|
hss.GoToScreen(Page);
|
|
|
|
|
}
|
2017-07-30 20:13:29 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-08-02 17:21:45 +08:00
|
|
|
|
}
|