public Transform BuildQuest(string[] questData) { Debugging.PrintDbQryResults(DbQueries.GetActivatedQuestsInCurrentGame()); string questName = questData[0]; bool completed = Convert.ToBoolean(int.Parse(questData[2])); print(questName); GameObject quest = Instantiate(questPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity) as GameObject; //print(quest); if (completed) { quest.GetComponent <Quest>().SetCompleted(); } quest.GetComponent <Quest>().MyName = questName; quest.GetComponentInChildren <Text>().text = questName; return(quest.transform); }
public void DisplayQuests() { FillDisplayFromDb(DbQueries.GetActivatedQuestsInCurrentGame(), questsList.transform, BuildQuest); }