You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
842 B
36 lines
842 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class GameManager : MonoBehaviour
|
|
{
|
|
public static GameManager Instance { get; private set; }
|
|
private void Awake()
|
|
{
|
|
if (Instance == null) Instance = this;
|
|
}
|
|
|
|
[Header("Managers")]
|
|
[SerializeField] private SceneLoader sceneLoader;
|
|
[SerializeField] private MainScreensManager mainScreensManager;
|
|
|
|
[Header("GameObjects")]
|
|
[SerializeField] private GameObject loadingScreen;
|
|
|
|
|
|
public void LoadScene(string sceneName)
|
|
{
|
|
loadingScreen.SetActive(true);
|
|
sceneLoader.LoadScene(sceneName, ()=>
|
|
{
|
|
InitializePlayers();
|
|
loadingScreen.SetActive(false);
|
|
mainScreensManager.SetGameScreen();
|
|
});
|
|
}
|
|
|
|
public void InitializePlayers()
|
|
{
|
|
|
|
}
|
|
}
|
|
|