2020-12-10 14:25:12 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
|
|
public class SceneChanger : MonoBehaviour
|
|
|
|
|
{
|
2021-01-28 12:07:52 +00:00
|
|
|
|
//private void OnEnable()
|
|
|
|
|
//{
|
|
|
|
|
// PassTheEdgeTrigger.OnPassingTheEdge += ChangeScene;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//private void OnDisable()
|
|
|
|
|
//{
|
|
|
|
|
// PassTheEdgeTrigger.OnPassingTheEdge -= ChangeScene;
|
|
|
|
|
//}
|
|
|
|
|
|
2020-12-10 14:25:12 +00:00
|
|
|
|
public void ChangeScene()
|
|
|
|
|
{
|
|
|
|
|
StartCoroutine("ChangeNow");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private IEnumerator ChangeNow()
|
|
|
|
|
{
|
|
|
|
|
yield return new WaitForSeconds(1);
|
2021-01-28 12:07:52 +00:00
|
|
|
|
//Prescene MazeGeneration
|
|
|
|
|
//SceneManager.LoadScene("MazeGeneration");
|
|
|
|
|
//Prescene RealPyramid
|
|
|
|
|
//SceneManager.LoadScene("RealPyramidCameraOrbit");
|
2020-12-10 14:25:12 +00:00
|
|
|
|
|
2021-01-28 12:07:52 +00:00
|
|
|
|
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
|
2020-12-10 14:25:12 +00:00
|
|
|
|
}
|
|
|
|
|
}
|