39 lines
784 B
C#
39 lines
784 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
public class GameStart : MonoBehaviour {
|
|||
|
|
|||
|
public Dropdown Dropdown_Counting;
|
|||
|
private string selectedLevel;
|
|||
|
private List<String> levels = new List<string>() { "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();
|
|||
|
}
|
|||
|
|
|||
|
}
|