public AgentTask GetAgentTask(SimulationAgent agent)
        {
            var at = new AgentTask();

            switch (agent.agentType)
            {
            case "Customer":
                if (agent.timeAlive < Random.Range(0, maxTaskTime))
                {
                    at.taskName  = "Shopping";
                    at.waypoints = CreateShoppingList(Random.Range(2, 20));
                }
                else
                {
                    at.taskName  = "Checking out";
                    at.waypoints = GetRoute(agent.transform.position, "Customer_Purchase_Exit");
                }
                break;
            }
            return(at);
        }
Beispiel #2
0
 public void GetNextTask() => agentTask = NavigationManager.Instance.GetAgentTask(this);