Global Game Jam 2021
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

38 lines
692 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HowToCycler : MonoBehaviour
{
[SerializeField]
private GameObject[] m_AllPanels;
private int m_count;
private void OnEnable()
{
m_count = 0;
foreach (GameObject panel in m_AllPanels)
panel.SetActive(false);
m_AllPanels[0].SetActive(true);
}
public void OnClickNext()
{
foreach(GameObject panel in m_AllPanels)
panel.SetActive(false);
m_count = (m_count + 1) % m_AllPanels.Length;
m_AllPanels[m_count].SetActive(true);
}
private void OnClickBack()
{
}
}