void OnTriggerEnter(Collider c) { if (onTrigger && c.tag == "Player") { SceneManaging.LoadScene(SceneID, ScenePart, SceneType); } }
// Update is called once per frame void Update() { timer -= Time.deltaTime; if (timer <= 0) { SceneManaging.LoadScene(SceneID, ScenePart, SceneType); } }
public static SceneManaging GetInstance() { if (!instance) { instance = (SceneManaging)FindObjectOfType(typeof(SceneManaging)); if (!instance) { Debug.LogError("There needs to be one active SceneManaging script on a SceneManaging in your scene."); } } return(instance); }
void Update() { clipLength -= Time.deltaTime; //when animation ends, load new scene if (clipLength < 0) { //fade out //--- // SceneManaging.LoadScene(LoadSceneID, LoadScenePart, LoadSceneType); } }
void OnTriggerEnter(Collider c) { if (c.tag == "Player") { PlayerPosition = c.gameObject.transform.position; switch (changeType) { case ROOMCHANGETYPE.In: SceneManaging.LoadScene(SceneID, ScenePart, SceneType); break; default: break; } } }
// Start is called before the first frame update void Start() { CC = GameObject.FindGameObjectWithTag("Cursor").GetComponent <CursorController>(); SM = GameObject.FindGameObjectWithTag("GameController").GetComponent <SceneManaging>(); //Index = PlayerPrefs.GetInt("levelAt"); }