56 lines
973 B
C#
56 lines
973 B
C#
using System.Collections.Generic;
|
|
using BitStrap;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class FisheryEditorHelp : MonoBehaviour
|
|
{
|
|
public List<GameObject> helpPages = new List<GameObject>();
|
|
|
|
public Button nextBtn;
|
|
|
|
public Button prevBtn;
|
|
|
|
[ReadOnly]
|
|
public int currentPage;
|
|
|
|
private void Start()
|
|
{
|
|
HidePages();
|
|
helpPages[0].SetActive(true);
|
|
prevBtn.gameObject.SetActive(false);
|
|
}
|
|
|
|
public void NextPage()
|
|
{
|
|
HidePages();
|
|
currentPage++;
|
|
helpPages[currentPage].SetActive(true);
|
|
if (currentPage == helpPages.Count - 1)
|
|
{
|
|
nextBtn.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
public void PrevPage()
|
|
{
|
|
HidePages();
|
|
currentPage--;
|
|
helpPages[currentPage].SetActive(true);
|
|
if (currentPage == 0)
|
|
{
|
|
prevBtn.gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
public void HidePages()
|
|
{
|
|
for (int i = 0; i < helpPages.Count; i++)
|
|
{
|
|
helpPages[i].SetActive(false);
|
|
}
|
|
nextBtn.gameObject.SetActive(true);
|
|
prevBtn.gameObject.SetActive(true);
|
|
}
|
|
}
|