public void pausedPlayer() { //Text text = gameObject.GetComponentInChildren<Canvas>().GetComponentInChildren<Text>(); NpcController npc = gameObject.GetComponent <NpcController>(); npc.setDirection(NpcController.Direction.STANDING); //text.enabled = true; }
void initNPCController(GameObject person, int startingPosition) { NpcController npc = person.GetComponent <NpcController>(); npc.setId(spawnedNPCs); npc.customerInfo = availableCustomers[Random.Range(0, availableCustomers.Count)]; npc.setDirection(startingPosition < 0 ? NpcController.Direction.RIGHT : NpcController.Direction.LEFT); updateSpawnedList(npc.customerInfo); }