void Start() { anim = GetComponent <Animator>(); counter = 0; character = GameObject.Find("Character"); dialogueBox = GameObject.Find("References").GetComponent <ReferencesScript>().dialogueBox; //TEMPORAL dialogue = dialogueBox.transform.GetChild(0).gameObject.GetComponent <Text>(); //TEMPORAL refereces = GameObject.Find("References"); pISys = character.GetComponent <PlayerInteractionSystem>(); }
// Start is called before the first frame update void Start() { reference = GameObject.Find("References").GetComponent <ReferencesScript>(); pMov = GetComponent <PlayerMovement>(); pISys = GetComponent <PlayerInteractionSystem>(); messageHolder = reference.dialogueBox; textHolder = messageHolder.transform.GetChild(0).GetComponent <Text>(); UI = reference.UI; hunger = 100; thirst = 100; money = 0; }