using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public class MainMenu : MonoBehaviour { // Use this for initialization void Start() { } // Update is called once per frame void Update() { } public void OnClickPlay() { // from main menu 'Play Game' -> character creation screen SceneManager.LoadScene("CharacterCreator"); } public void OnClickDone() { // from character creation -> first scene of the game //if we have unallocated stats, we cannot proceed to the game. float messageDuration = 5; if (ChooseCharStats.unallocated == 0) SceneManager.LoadScene("Town01"); // else if (ChooseCharStats.unallocated > 0) // { // while (messageDuration > 0) // { // messageDuration -= Time.deltaTime; // ChooseCharStats.unalocText.text = "Must Allocate All Remaining Stat Points"; // } // ChooseCharStats.unalocText.text = "Unallocated: " + ChooseCharStats.unallocated.ToString(); // } } }