// Use this for initialization void Start() { Cursor.visible = false; introScreen.enabled = true; mainMenu.enabled = false; tutorialScreen.enabled = false; pauseMenu.enabled = false; loseScreen.enabled = false; winScreen.enabled = false; winScreenScript = winScreen.GetComponent <WinScreenScript>(); player = GameObject.FindGameObjectWithTag("Player").transform; playerController = player.GetComponent <FirstPersonController>(); resetPlayer(); GameObject[] trolls = GameObject.FindGameObjectsWithTag("Troll"); foreach (GameObject troll in trolls) { trollControllers.Add(troll.GetComponent <NavMeshAgent>()); } disableTrolls(); introScreen.GetComponent <FadeTextScript>().StartSequence(); }
// Start is called before the first frame update void Start() { WinScreenScript Win = FindObjectOfType <WinScreenScript>(); menuWin = Win.gameObject; menuWin.gameObject.SetActive(false); LoseScreenScript Lose = FindObjectOfType <LoseScreenScript>(); menuLose = Lose.gameObject; menuLose.gameObject.SetActive(false); }