using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using SiegeSong; namespace SiegeSong { public class OptionsListSelect : MonoBehaviour { public string[] Options; public int SelectedIndex; public Text TextDisplay; public void Start() { } public void Update() { } public void NextIndex() { if (SelectedIndex == Options.Length) SelectedIndex = 0; else SelectedIndex++; TextDisplay.text = Options[SelectedIndex]; } public void PreviousIndex() { if (SelectedIndex == 0) SelectedIndex = Options.Length; else SelectedIndex--; TextDisplay.text = Options[SelectedIndex]; } } }