Пример #1
0
    public void PressToInteract()
    {
        if (Vector3.Distance(player.transform.position, this.transform.position) < 3)
        {
            chatBubble.GetComponent <SpriteRenderer>().enabled = true;

            //start conversation
            if (Input.GetKeyUp("e") && !dialogueBox.isConversating)
            {
                dialogueBox.currentSentence = 0;
                dialogueBox.sentences       = sentences;
                dialogueBox.ActivateDialogueBox(sentences, characterName, sprite, this.transform.position);
            }
        }
        else
        {
            chatBubble.GetComponent <SpriteRenderer>().enabled = false;
        }
    }