using EasyTalk.Controller; using UnityEngine; public class NPC : Character { public enum NPCType { Villager, Merchant, Guard } public NPCType npcType; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } // Update is called once per frame void Update() { } public void Interact() { if (npcType == NPCType.Merchant) { Debug.Log($"Welcome to my shop, {charName}!"); } else if (npcType == NPCType.Villager) { dialogueController.ChangeDialogue(dialogue); dialogueController.PlayDialogue(); } else if (npcType == NPCType.Guard) { Debug.Log($"Stay out of trouble, citizen. I'm {charName}, a guard."); } else { Debug.Log($"Greetings from {charName}!"); } } }