// Start is called before the first frame update public void OnTriggerEnter(Collider other) { if ((other.gameObject.name == "Cat") && (other.gameObject.GetComponent <Cat>().GetLevel() < 2)) { //FindObjectOfType<UIController>().ActivateUI(); //FindObjectOfType<ConversationController>() dialogBox.OpenConversation(); //FindObjectOfType<ConversationController>() dialogBox.UpdateConversation("Looks like there's some shiny light through the trees, but they're not going to let you pass."); } }
// Start is called before the first frame update public void OnTriggerEnter(Collider other) { if ((other.gameObject.name == "Cat") && (other.gameObject.GetComponent <Cat>().GetLevel() < 1)) { if (dialogBox == null) { dialogBox = FindObjectOfType <ConversationController>(); OnTriggerEnter(other); return; } //FindObjectOfType<UIController>().ActivateUI(); //FindObjectOfType<ConversationController>() dialogBox.OpenConversation(); //FindObjectOfType<ConversationController>() dialogBox.UpdateConversation("Woah, that fire looks hot. Better find something wet before you singe your paws!"); } }
// Start is called before the first frame update public void OnTriggerEnter(Collider other) { if ((other.gameObject.name == "Cat") && (other.gameObject.GetComponent <Cat>().GetLevel() < 3)) { if (dialogBox == null) { dialogBox = FindObjectOfType <ConversationController>(); OnTriggerEnter(other); return; } //FindObjectOfType<UIController>().ActivateUI(); //FindObjectOfType<ConversationController>() dialogBox.OpenConversation(); //FindObjectOfType<ConversationController>() dialogBox.UpdateConversation("Everything here looks really heavy. A cat probably can't move it without a force as strong as a hurricane."); } }