using System;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
namespace Unity.VRTemplate
{
///
/// Controls the steps in the in coaching card.
///
public class StepManager : MonoBehaviour
{
[Serializable]
class Step
{
[SerializeField]
public GameObject stepObject;
[SerializeField]
public string buttonText;
}
[SerializeField]
public TextMeshProUGUI m_StepButtonTextField;
[SerializeField]
List m_StepList = new List();
int m_CurrentStepIndex = 0;
public void Next()
{
m_StepList[m_CurrentStepIndex].stepObject.SetActive(false);
m_CurrentStepIndex = (m_CurrentStepIndex + 1) % m_StepList.Count;
m_StepList[m_CurrentStepIndex].stepObject.SetActive(true);
m_StepButtonTextField.text = m_StepList[m_CurrentStepIndex].buttonText;
}
}
}