private void PlayerInteract() { if (currentItem != null) { currentItem.Interact(playerController); UIManager.current.updateUICallback.Invoke(); } if (currentNPC != null) { currentNPC.StartDialogue(); } }
// Update is called once per frame void Update() { if (GetComponent <Notes>().isNotesFocused() == false) { Move(); if (Input.GetKeyDown(KeyCode.E)) { InteractableItem closest = GetClosestInteractable(); if (closest != null) { closest.Interact(); } } if (Input.GetKeyDown(KeyCode.N)) { NotesPanel.SetActive(!NotesPanel.activeSelf); } } }