// GET: Topics public async Task <ActionResult> Index() { List <Concept> concepts = await db.Concepts.ToListAsync(); List <ConceptData> cd = new List <ConceptData>(); foreach (Concept i in concepts) { List <Topic> t = db.Topics.Where(o => o.ConceptId.Equals(i.Id)).ToList(); Random random = new Random(); ConceptData CC = new ConceptData(); if (t.Count < 1) { } else { CC.concept = i; CC.topic = t[random.Next(0, maxValue: t.Count - 1)]; cd.Add(CC); } } return(View(cd)); }
void Start() { //References dataController = FindObjectOfType <DataController>(); currentConceptData = dataController.GetCurrentConceptData(); strategyPool = currentConceptData.strategyData; uIController = FindObjectOfType <UIController>(); //Disable overlay strategyPanel.SetActive(false); //Set Header Text conceptTitleText.text = currentConceptData.conceptName; //Populate Strategy Buttons ShowStrategies(); //Attempt to get images loading DirectoryInfo directoryInfo = new DirectoryInfo(Application.streamingAssetsPath); //Debug.Log("Streaming Assets Path: " + Application.streamingAssetsPath); allFiles = directoryInfo.GetFiles("*.*"); //foreach (FileInfo file in allFiles) { //Debug.Log(file); //} }