holopy3/Assets/Scripts/SceneChanger.cs
Lena Biresch 490ef558ef CleanUp
2021-01-28 13:07:52 +01:00

33 lines
811 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneChanger : MonoBehaviour
{
//private void OnEnable()
//{
// PassTheEdgeTrigger.OnPassingTheEdge += ChangeScene;
//}
//private void OnDisable()
//{
// PassTheEdgeTrigger.OnPassingTheEdge -= ChangeScene;
//}
public void ChangeScene()
{
StartCoroutine("ChangeNow");
}
private IEnumerator ChangeNow()
{
yield return new WaitForSeconds(1);
//Prescene MazeGeneration
//SceneManager.LoadScene("MazeGeneration");
//Prescene RealPyramid
//SceneManager.LoadScene("RealPyramidCameraOrbit");
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
}