using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class GameStart : MonoBehaviour { public Dropdown Dropdown_Counting; private string selectedLevel; private List levels = new List() { "Count1", "Count2", "Count3" }; public new AudioSource audio; void Start() { PopulateCountingDropdown(); } public void Dropdown_IndexChanged(int index) { Gamestate.Instance.setLevel(levels[index]); } private void PopulateCountingDropdown() { Dropdown_Counting.AddOptions(levels); } private void startGame() { print("Starting game"); DontDestroyOnLoad(Gamestate.Instance); Gamestate.Instance.startState(); } }