// Update is called once per frame void Update() { if (letter10.isComplete && !audioSource.isPlaying && !yesDisabled && player.GetDay() == 4) { yesDisabled = true; yesButton.enabled = false; blocker.SetActive(true); StartCoroutine(WaitForDialogue(dialogues[0])); } if (player.GetDay() == 5 && !day5) { day5 = true; bossImage.SetActive(true); yesButton.enabled = false; clockButton.enabled = false; StartCoroutine(WaitForDialogue(dialogues[1])); } if (dialogues[1].isComplete && !herLetter.isComplete) { bossImage.SetActive(false); } if (manager.currSentence == dialogues[1].sentences[2]) { envelope.SetActive(true); } if (herLetter.isComplete && closeButton.gameObject.activeInHierarchy == false && !hers) { hers = true; bossImage.GetComponent <Image>().sprite = evelyn; bossImage.SetActive(true); StartCoroutine(WaitForDialogue(dialogues[2])); } if (dialogues[2].isComplete && !gameEnd) { gameEnd = true; fader.FadeToLevel(4); } }
// Start is called before the first frame update void Start() { day = player.GetDay(); if (day == 0) { dayText.text = "Training Day Complete"; } else { dayText.text = "Day " + day + " Complete"; } totEarnings = player.GetMoney(); dayEarnings = player.GetMoney() - player.GetPrevMoney(); currTotEarnings = player.GetPrevMoney(); dayText.gameObject.SetActive(false); dayEarningsText.gameObject.SetActive(false); totEarningsText.gameObject.SetActive(false); dayEarningsNum.gameObject.SetActive(false); totEarningsNum.gameObject.SetActive(false); clickToContinue.gameObject.SetActive(false); }