private void LoadQuestFormFile(string fileName) { HexQuest quest = new HexQuest(); quest.type = HexQuestType.MAIN; quest.Load(fileName); questList.Add(quest); }
public void Init() { if (questList != null) { return; } questList = new List <HexQuest>(); FindAllFiles.ListFiles(PathUtil.GetQuestDir(HexQuestType.CUSTOM), false, (fileName) => { HexQuest quest = new HexQuest(); quest.type = HexQuestType.CUSTOM; quest.Load(fileName); questList.Add(quest); CustomModel.MAX_QUEST_ID = Mathf.Max(CustomModel.MAX_QUEST_ID, quest.id); }); }