private void OnTriggerEnter(Collider other) { if (!other.gameObject.CompareTag("Player")) { return; } if (EventType == OnTriggerEvent.SetActive) { TextDisplayer.ShowText(DisplayText); } else { TextDisplayer.HideText(); } }
private IEnumerator WaitFor() { yield return(new WaitForSeconds(3)); TextDisplayer.HideText(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); }