void LoadNextSceneInArea() { SaveLevelData(); string str = SceneManager.GetActiveScene().name.Split('_')[2]; int l = int.Parse(str); string sceneName = areaName + "_lvl_" + (l + 1); if ((l + 1) > (int)area) { //areaName finished EndText.text = "Finished Area"; StartCoroutine(Wait(2f, () => { EndText.text = ""; SceneManager.LoadScene("AreasMenu"); })); } try { SceneManager.LoadScene(sceneName); } catch (Exception) { MenuControl.LoadScene("Menu"); } }
// Update is called once per frame void Update() { if (red1.bounds.min.y <= red2.bounds.max.y) { Debug.Log("Kill me now!"); mc.LoadScene("LoseGame"); } }
public void RetryLevel() { MenuControl.LoadScene(level); }
public void RetryArea() { MenuControl.LoadScene(areaName + "_lvl_1"); }