Add main menu, loding screen and loding logic

This commit is contained in:
BuyMyMojo 2023-03-03 10:57:46 +11:00
parent 0c71d06fb8
commit 2ffb285e0b
15 changed files with 3176 additions and 525 deletions

35
Assets/Scripts/Loader.cs Normal file
View file

@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public static class Loader
{
public enum Scene
{
MainMenuScene,
GaneScene, // Spelling mistake I am leaving in because it's funny :)
LoadingScene
}
private static Scene targetScene;
public static void Load(Scene targetScene)
{
Loader.targetScene = targetScene;
SceneManager.LoadScene(Scene.LoadingScene.ToString());
}
// Jank AF
public static void LoaderCallback()
{
SceneManager.LoadScene(Loader.targetScene.ToString());
}
}