using System.IO; using UnityEngine; /// /// StartScreen scene manager /// public class MainMenuScreen : MonoBehaviour { /// /// Referece to the userlist to check whether an user account is present /// public UserList userList; /// /// Check on load whether a user is already present, /// if not load the UserCreationScreen scene so the user can create a new account /// void Awake() { userList.Load(); if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0) { SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen"); } } /// /// Quit the application /// public void QuitApplication() { Application.Quit(); } /// /// Load the `CoursesMenuScreen` scene /// public void GotoCourses() { SystemController.GetInstance().LoadNextScene("Common/Scenes/CoursesMenuScreen"); } /// /// Load the `ListMinigamesScreen` scene /// public void GotoMinigames() { SystemController.GetInstance().LoadNextScene("Common/Scenes/ListMinigamesScreen"); } /// /// Load the `SettingsScreen` scene /// public void GotoSettings() { SystemController.GetInstance().LoadNextScene("Common/Scenes/SettingsScreen"); } }