예제 #1
0
    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();
        }
    }
예제 #2
0
    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();
    }