void ChangeScene() { if (SceneName == "EndScreen") { ClockScript GM = GameObject.Find("GameManager").GetComponent <ClockScript>(); if (GM.getCurrentHour() > 8) { GameObject.FindGameObjectWithTag("PlayerInformation").GetComponent <PlayerInformationScript>().timeLeftHouse = PlayerInformationScript.InterviewArrivalTime.late; } else if (GM.getCurrentHour() < 8) { GameObject.FindGameObjectWithTag("PlayerInformation").GetComponent <PlayerInformationScript>().timeLeftHouse = PlayerInformationScript.InterviewArrivalTime.early; } else { if (GM.getCurrentMinutes() > 45) { GameObject.FindGameObjectWithTag("PlayerInformation").GetComponent <PlayerInformationScript>().timeLeftHouse = PlayerInformationScript.InterviewArrivalTime.late; } else if (GM.getCurrentMinutes() < 31) { GameObject.FindGameObjectWithTag("PlayerInformation").GetComponent <PlayerInformationScript>().timeLeftHouse = PlayerInformationScript.InterviewArrivalTime.early; } else { GameObject.FindGameObjectWithTag("PlayerInformation").GetComponent <PlayerInformationScript>().timeLeftHouse = PlayerInformationScript.InterviewArrivalTime.onTime; } } } SceneManager.LoadScene(SceneName, LoadSceneMode.Single); }
// Update is called once per frame void Update() { if (!interviewPopupHasHappened && clockScript.getCurrentHour() >= 8 && clockScript.getCurrentMinutes() >= 10 && clockScript.isSecondDay) { interviewPopupHasHappened = true; GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControllerScript>().playerMovementEnabled = false; GameObject.FindGameObjectWithTag("GameManager").GetComponent <ClockScript>().timeIsPaused = true; interviewPopupUI.SetActive(true); } }
// Update is called once per frame void Update() { if (!goOutPopUpHasHappened && clockScript.getCurrentHour() >= 19 && PlayerUseItem.CurrentPhase == "Afternoon") { goOutPopUpHasHappened = true; GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControllerScript>().playerMovementEnabled = false; GameObject.FindGameObjectWithTag("GameManager").GetComponent <ClockScript>().timeIsPaused = true; goOutInvite_UI.SetActive(true); } }