예제 #1
0
    // Update is called once per frame
    void Update()
    {
        // Set bools from others (some comes from DialogueManager and RubStates)
        _canInteract = _isInRange;

        if (_canInteract && Input.GetButtonDown("Interact"))
        {
            // run the action
            _dialoguesList.RunDialogue(EndOfThisTalkTrigger);
        }
    }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        // Set bools from others (some comes from DialogueManager and RubStates)
        _isInDialogue = DialogueManager.instance.GetIsInDialogue();
        _canInteract  = _isInRange && !RubStates.instance.GetIsOnPasserelle();

        if (_canInteract && !_isInDialogue)
        {
            // make feedbak "[e]" just above the interactable object
            hudIndication.SetActive(true);
        }
        else
        {
            // remoove feedbak "[e]"
            hudIndication.SetActive(false);
        }
        if (_canInteract && Input.GetButtonDown("Interact"))
        {
            // run the action
            hudIndication.SetActive(false);
            _dialoguesList.RunDialogue();
        }
    }