Add scene transitions, lose sanity points
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Scampz.GameJam
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
public static GameManager Instance;
|
||||
//private LevelChanger _levelChanger;
|
||||
private LevelChanger _levelChanger;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace Scampz.GameJam
|
||||
}
|
||||
|
||||
Instance = this;
|
||||
//_levelChanger = GetComponentInChildren<LevelChanger>();
|
||||
_levelChanger = GetComponentInChildren<LevelChanger>();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ namespace Scampz.GameJam
|
||||
|
||||
private IEnumerator LoadSceneAsync(string sceneName, LoadSceneMode loadSceneMode)
|
||||
{
|
||||
yield return null;
|
||||
_levelChanger.FadeAnimation();
|
||||
yield return new WaitForSecondsRealtime(3f);
|
||||
|
||||
var loadSceneOperation = SceneManager.LoadSceneAsync(sceneName, loadSceneMode);
|
||||
loadSceneOperation.allowSceneActivation = false;
|
||||
while (!loadSceneOperation.isDone)
|
||||
|
||||
Reference in New Issue
Block a user