public void SelectAXCPTCategory() { var selectedCategory = categoryDropdown.value; CategoryLoader categoryloader = taskList.axcpt.GetComponent(typeof(CategoryLoader)) as CategoryLoader; categoryloader.LoadCategory(selectedCategory); axcptMenu.SetActive(false); StartTask(taskList.axcpt); }
/// <summary> /// Populate the map based upon the passed category ID. /// </summary> private void PopulateByCategory() { if (Request.Params["populateCategoryID"] != null) { PlacemarkLoader loader = new CategoryLoader(Convert.ToInt32(Request.Params["populateCategoryID"])); loader.PopulateWith = (PopulationType)Convert.ToInt32(ddlPopulateWith.SelectedValue); map.Loaders.Add(loader); } }
public override IList <ModelTreeNode> LoadTree(string path) { var json = File.ReadAllText(path); var loader = new CategoryLoader <Invasion>(); var models = loader.ParseCategorysAndModels(json); //try to load in either npcs or categories, and create corresponding nodes for each. var nodes = models.Select(m => m is CategoryModel ? (ModelTreeNode) new CategoryTreeNode <Invasion, InvasionTreeNode>((CategoryModel)m, path) : (ModelTreeNode) new InvasionTreeNode((Invasion)m)) .ToList(); return(nodes); }
public void SelectTask() { var selectedTask = taskDropdown.value; switch (selectedTask) { case 0: if (taskList.axcpt != null) { mainMenu.SetActive(false); axcptMenu.SetActive(true); taskList.axcpt.GetComponent <AXCPTPractice>().enabled = false; } break; case 1: if (taskList.axcpt != null) { mainMenu.SetActive(false); CategoryLoader categoryloader = taskList.axcpt.GetComponent(typeof(CategoryLoader)) as CategoryLoader; categoryloader.LoadCategoryByString("Shapes"); taskList.axcpt.GetComponent <AXCPTPractice>().enabled = true; StartTask(taskList.axcpt); } break; case 2: if (taskList.math != null) { mainMenu.SetActive(false); mathMenu.SetActive(true); taskList.math.GetComponent <MathPractice>().enabled = false; } break; case 3: if (taskList.math != null) { mainMenu.SetActive(false); taskList.math.GetComponent <MathPractice>().enabled = true; StartTask(taskList.math); } break; case 4: if (taskList.verbalStroop != null) { mainMenu.SetActive(false); taskList.verbalStroop.GetComponent <VerbalStroopPractice>().enabled = false; StartTask(taskList.verbalStroop); } break; case 5: if (taskList.verbalStroop != null) { taskList.verbalStroop.GetComponent <VerbalStroopPractice>().enabled = true; StartTask(taskList.verbalStroop); } break; case 6: if (taskList.noTask != null) { StartTask(taskList.noTask); } break; } }