void OnTriggerEnter(Collider other) { if (other.tag == "Player" && !permenantlyDisabled) { PlayerHud.SetInteractText(GetComponent <DisplayText>().displayText); PlayerHud.ToggleInteractPrompt(true); } }
// Only used for the bed/sleep trigger void OnTriggerStay(Collider other) { if (other.tag == "Player" && name.Equals("Bed")) { PlayerHud.SetInteractText(GetComponent <DisplayText>().displayText); PlayerHud.ToggleInteractPrompt(TimeManager.IsInSleepTimeFrame()); canInteract = TimeManager.IsInSleepTimeFrame(); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { canInteract = true; PlayerHud.SetInteractText(GetComponent<DisplayText>().displayText); PlayerHud.ToggleInteractPrompt(true); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (name.Equals("Bed") && !TimeManager.IsInSleepTimeFrame()) { return; } canInteract = true; PlayerHud.SetInteractText(GetComponent <DisplayText>().displayText); PlayerHud.ToggleInteractPrompt(true); } }