public void PlayGame() { audioManager.PlayButtonSound(); if (!GameManager.Instance.completedTutorial) { SceneManager.LoadScene("Tutorial"); } else { SceneManager.LoadScene("Map 1"); } }
public void Load_Scene(string sceneName) { audioManager.PlayButtonSound(); UnityEngine.SceneManagement.SceneManager.LoadScene(sceneName); }
public void NextDialogText(GameObject button) { audioManager.PlayButtonSound(); if (Tutorial_Manager.Instance.InstructionsIndex < 11) { dialogBox.GetComponent <Text>().text = Tutorial_Manager.Instance.InstructionsText[Tutorial_Manager.Instance.InstructionsIndex]; } switch (Tutorial_Manager.Instance.InstructionsIndex) { case 1: button.GetComponentInChildren <Text>().text = "Next"; break; case 2: button.GetComponentInChildren <Text>().text = "Okay"; break; case 3: GameManager.Instance.money += 25; GameManager.Instance.pauseGame = false; dialogWindow.SetActive(false); button.GetComponentInChildren <Text>().text = "Okay"; reminderTimer = 300; break; case 4: GameManager.Instance.pauseGame = false; dialogWindow.SetActive(false); button.GetComponentInChildren <Text>().text = "Next"; reminderTimer = 300; break; case 5: button.GetComponentInChildren <Text>().text = "Okay"; break; case 6: GameManager.Instance.money += 50; GameManager.Instance.pauseGame = false; dialogWindow.SetActive(false); button.GetComponentInChildren <Text>().text = "Okay"; reminderTimer = 300; break; case 7: GameManager.Instance.currentPhase = GameManager.Phase.NIGHT; spawner.GetComponent <Spawner>().SpawnBug(); dialogWindow.SetActive(false); GameManager.Instance.pauseGame = false; button.GetComponentInChildren <Text>().text = "Next"; reminderTimer = 300; break; case 8: button.GetComponentInChildren <Text>().text = "Okay"; break; case 9: QuestController.GetComponent <Quest_Controller>().CreateTutorialQuest(); dialogWindow.SetActive(false); GameManager.Instance.pauseGame = false; button.GetComponentInChildren <Text>().text = "Okay"; reminderTimer = 300; break; case 10: dialogWindow.SetActive(false); GameManager.Instance.pauseGame = false; button.GetComponentInChildren <Text>().text = "Okay"; reminderTimer = 300; break; case 11: button.GetComponentInChildren <Text>().text = "Next"; Tutorial_Manager.Instance.InstructionsIndex = 1; Tutorial_Manager.Instance.tutorialStartred = false; GameManager.Instance.completedTutorial = true; GameManager.Instance.pauseGame = false; SceneManager.LoadScene("Map 1"); break; } if (Tutorial_Manager.Instance.InstructionsIndex < 11) { Tutorial_Manager.Instance.InstructionsIndex++; } }