public void CustomQuestButton() { selectedQuest = new SetOfQuest(); selectedQuest.setName = ""; selectedQuest.quests = new List <QuestParam>(); nextQuest = new QuestParam(); nextQuest.missions = new List <Mission>(); nextQuest.next = new List <int>(); }
public void SetQuestsChoice() { questChoice.ClearOptions(); questParams.Clear(); foreach (string q in dataFiles.scenarioDatas) { string filePath = Path.Combine(Application.persistentDataPath, "Quests", q); if (!File.Exists(filePath)) { string dataAsJson = File.ReadAllText(filePath + ".json"); SetOfQuest tmp = new SetOfQuest(); JsonUtility.FromJsonOverwrite(dataAsJson, tmp); questParams.Add(tmp); } } questChoice.AddOptions(dataFiles.scenarioDatas); if (defaultSetQuest.Count > 0) { selectedQuest = defaultSetQuest[0]; } }
public void SetDropDownQuest(int n) { selectedQuest = questParams[n]; }