private void Start() { npcDialogueText = GetComponent <NPCLoadDialogueText>(); NPCButton = GetComponent <NPCSetButton>(); ui = FindObjectOfType <ToggleUI>(); dialogueText.text = ""; }
protected void getComponents() { NPCDialogueTextLoader = GetComponent <NPCLoadDialogueText>(); npcShowDialogueText = GetComponent <NPCShowDialogueText>(); npcLookAtObject = GetComponent <NPCLookAtObject>(); rigid = GetComponent <Rigidbody>(); player = GameObject.FindGameObjectWithTag(TagList.Player); ui = GameObject.FindObjectOfType <ToggleUI>(); NPCDialogueTextLoader.loadDialogueText(LoadXML.LoadLocalFile("XML/npc_dialogue")); }