예제 #1
0
    public void pausedPlayer()
    {
        //Text text = gameObject.GetComponentInChildren<Canvas>().GetComponentInChildren<Text>();
        NpcController npc = gameObject.GetComponent <NpcController>();

        npc.setDirection(NpcController.Direction.STANDING);
        //text.enabled = true;
    }
예제 #2
0
    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);
    }