Demo day booth
This commit is contained in:
committed by
Jelle De Geest
parent
5b4a3ec4e7
commit
fcd8acad1e
@@ -1,11 +1,32 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
/// <summary>
|
||||
/// StartScreen scene manager
|
||||
/// </summary>
|
||||
public class MainMenuScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the enter animation scene playable director
|
||||
/// </summary>
|
||||
public PlayableDirector directorEnterFromBoot;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the enter animation scene playable director
|
||||
/// </summary>
|
||||
public PlayableDirector directorEnterFromCourseMenu;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the enter animation scene playable director
|
||||
/// </summary>
|
||||
public PlayableDirector directorEnterFromListMinigames;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the enter animation scene playable director
|
||||
/// </summary>
|
||||
public PlayableDirector directorEnterFromSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Check on load whether a user is already present,
|
||||
/// if not load the UserCreationScreen scene so the user can create a new account
|
||||
@@ -14,10 +35,27 @@ public class MainMenuScreen : MonoBehaviour
|
||||
{
|
||||
if (!File.Exists(PersistentDataController.PATH) || UserList.GetUsers().Count <= 0)
|
||||
{
|
||||
UserCreationScreen.canGoBack = false;
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start is called before the first frame update
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
var sys = SystemController.GetInstance();
|
||||
if (sys.previousScene == SystemController.GetSceneIndex("Common/Scenes/Boot"))
|
||||
directorEnterFromBoot.Play();
|
||||
else if (sys.previousScene == SystemController.GetSceneIndex("Common/Scenes/CoursesMenuScreen"))
|
||||
directorEnterFromCourseMenu.Play();
|
||||
else if (sys.previousScene == SystemController.GetSceneIndex("Common/Scenes/ListMinigamesScreen"))
|
||||
directorEnterFromListMinigames.Play();
|
||||
else if (sys.previousScene == SystemController.GetSceneIndex("Common/Scenes/SettingsScreen"))
|
||||
directorEnterFromSettings.Play();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Quit the application
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user