// Start is called before the first frame update void Start() { agents = new List <GameObject>(); destinations = new GameObject[agentNumber]; reducedVisibilityGraph = GameObject.FindObjectOfType <ReducedVisibilityGraph>(); agentStart = false; Invoke(nameof(spawnAgent), 0.1f); }
// Initialization needs to be after reduced visibility graph private void Start() { numberOfPathsPlaned = 0; numberOfReplanning = 0; numberOfSuccess = 0; agentController = FindObjectOfType <AgentController>(); reducedVisibilityGraph = FindObjectOfType <ReducedVisibilityGraph>(); Invoke(nameof(StartANewRound), 0.1f); }
private void Start() { graph_script = GameObject.Find("Graph").GetComponent <ReducedVisibilityGraph>(); vertex_list = graph_script.vertex_list; agent_count = graph_script.agent_count; //making a deep copy of the adjacency list adjacency_list = graph_script.adjacency_list.ConvertAll(x => new List <node>(x).ConvertAll(y => new node(y))); //Spawns the agents for (int i = 0; i < agent_count; i++) { AgentThread(); } }