void OnTriggerEnter(Collider other) { if (other.transform.tag == "Player") { loadController.LoadScene(nextLevel); } }
public void LoadSimpleScene_ShouldWork() { var testFile = "tests/test_scene01"; var scene = controller.LoadScene(testFile); Assert.NotNull(scene); Assert.NotNull(scene.Name); Assert.NotNull(scene.Description); Assert.NotNull(scene.NextScene); }
public void LoadNextScene() { _load.LoadScene("Level1"); }
void Update() { cursor.GetComponent <RectTransform>().anchoredPosition = cursorPos; if (Input.GetAxisRaw("Vertical") != 0) { if (!vAxisInUse && Input.GetAxisRaw("Vertical") < 0) { vAxisInUse = true; if ((int)cursorAt < 2) { ui._sound.PlayOneShot(ui.buttonHover); cursorAt++; } } else if (!vAxisInUse && Input.GetAxisRaw("Vertical") > 0) { vAxisInUse = true; if ((int)cursorAt > 0) { ui._sound.PlayOneShot(ui.buttonHover); cursorAt--; } } } else { vAxisInUse = false; } if (Input.GetButtonDown("Cancel")) { Continue(); } if (Input.GetKeyDown(InputManager.Slash) || Input.GetKeyDown(InputManager.JSlash)) { if (cursorAt == CursorAt.Continue) { Continue(); } else if (cursorAt == CursorAt.MainMenu) { load.LoadScene("MainMenu2"); } else if (cursorAt == CursorAt.ExitGame) { Application.Quit(); } } if (cursorAt == CursorAt.Continue) { itemsInList[0].color = new Color(233f / 255f, 1, 131f / 255f); itemsInList[2].color = Color.white; itemsInList[1].color = Color.white; cursorPos = new Vector3(0, 140, 0); } if (cursorAt == CursorAt.MainMenu) { itemsInList[1].color = new Color(233f / 255f, 1, 131f / 255f); itemsInList[0].color = Color.white; itemsInList[2].color = Color.white; cursorPos = new Vector3(0, 60, 0); } if (cursorAt == CursorAt.ExitGame) { itemsInList[2].color = new Color(233f / 255f, 1, 131f / 255f); itemsInList[1].color = Color.white; itemsInList[0].color = Color.white; cursorPos = new Vector3(0, -20, 0); } }