public IWaypointTask LoadTask(string taskName, XmlNode node) { if (!taskName.Contains("Task")) { taskName += "Task"; } taskName.Replace(" ", ""); switch (taskName.ToLower()) { case "cargotask": Task = new CargoTask(node); break; case "colonisetask": Task = new ColoniseTask(node); break; case "invadetask": Task = new InvadeTask(node); break; case "layminestask": Task = new LayMinesTask(node); break; case "scraptask": Task = new ScrapTask(node); break; case "splitmergetask": Task = new SplitMergeTask(node); break; default: Task = new NoTask(); break; } return(Task); }
/// <summary> /// Default constructor. /// </summary> public Waypoint() { WarpFactor = 6; Task = new NoTask(); }