void OnMouseOver() { float distance = Vector3.Distance(this.transform.position, PlayerObject.transform.position); if (Input.GetKeyDown(KeyCode.E) && distance < minDistanceToObject) { //showExamine(); ExamineText.GetComponentInChildren <Text>().text = this.GetComponentInChildren <ShowText>().GetText(); showcanvas.showtheCanvas(); } }
public void StartDialogue(Dialogue dialogue) { states.currentState = States.PlayerStates.DialogueState; sc.showtheCanvas(); nameText.text = dialogue.name; sentences.Clear(); foreach (string sentence in dialogue.sentences) { sentences.Enqueue(sentence); } DisplayNextSentence(); }