using UnityEngine; public class Talkable : Interactable { // this is a character or object that will talk upon interaction public Dialogue dialogue; public GameObject talkIndicator; public void Start() { talkIndicator.SetActive(false); } public override void Interact() { if (!dialogue.isActive) GameManager.Instance.DialogueManager.StartDialogue(dialogue); else GameManager.Instance.DialogueManager.DisplayNextSentence(); talkIndicator.SetActive(false); } public override void MoveInsideRange() { talkIndicator.SetActive(true); } public override void MoveOutsideRange() { GameManager.Instance.DialogueManager.EndDialogue(); talkIndicator.SetActive(false); } }