void OnMouseDown() { string header = "Confirm Character selection:\n"; TextMeshProUGUI textMesh = confirmationContainer.GetComponentInChildren <TextMeshProUGUI>(); switch (characterType) { case "Swordman": ProgramStateController.characterSelected = "Swordman"; textMesh.text = header + "Swordman"; break; case "Bowman": ProgramStateController.characterSelected = "Bowman"; textMesh.text = header + "Bowman"; break; case "Warrior": ProgramStateController.characterSelected = "Warrior"; textMesh.text = header + "Warrior"; break; case "Magician": ProgramStateController.characterSelected = "Magician"; textMesh.text = header + "Magician"; break; } confirmationContainer.SetActive(true); CharacterSelectionCollider.disableCollider(); }
public void confirmSelection() { confirmationContainer.SetActive(false); CharacterSelectionCollider.enableCollider(); SceneManager.LoadScene(sceneName: "Registration"); }