29 lines
645 B
C#
29 lines
645 B
C#
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Assets.Scripts.UI.Control
|
|
{
|
|
public class PFUIPageButton : PFUIComponentBase
|
|
{
|
|
public Text pageIndexText;
|
|
public GameObject clickImage;
|
|
|
|
public int PageIndex { get; set; }
|
|
|
|
public void SetPageIndex(int pageIndex)
|
|
{
|
|
PageIndex = pageIndex;
|
|
pageIndexText.text = $"{pageIndex + 1}";//pageIndex 从0开始
|
|
}
|
|
public void ShowLight()
|
|
{
|
|
clickImage.SetActive(true);
|
|
}
|
|
public void ShowShadow()
|
|
{
|
|
clickImage.SetActive(false);
|
|
}
|
|
}
|
|
}
|