public static Agent[] Get_Agent_Batch(AgentCommands[] its_commands) { Agent[] returner = new Agent[its_commands.Length]; for (int rep_agent = 0; rep_agent < its_commands.Length; rep_agent++) { returner[rep_agent] = Obtain_Agent_Copy(its_commands[rep_agent].TheAgentName); returner[rep_agent].TheActions = its_commands[rep_agent].TheAgentActions; } return returner; }
public static AgentCommands[] Get_Generated_Plan() { string[] quick_list = self.GetComponent<TaskPlannerProcess>().todoList; AgentCommands[] returner = new AgentCommands[quick_list.Length]; for (int rep_action = 0; rep_action < quick_list.Length; rep_action++) { char[] quick_splitter = new char[1]; quick_splitter[0] = ' '; string[] quick_splits = quick_list[rep_action].Split(quick_splitter); returner[rep_action].TheAgentName = quick_splits[1].Remove(0,1); returner[rep_action].TheAgentActions = new string[quick_splits.Length - 4]; for (int rep_agent = 0; rep_agent < quick_splits.Length - 4; rep_agent++) { returner[rep_action].TheAgentActions[rep_agent] = quick_splits[rep_agent + 2]; } } return returner; }