/// <summary> /// 全てのクエストを読み込む /// </summary> private List <QuestVO> LoadAllQuestFromMaster() { var idValues = Enum.GetValues(typeof(QuestMaster.rowIds)) .Cast <QuestMaster.rowIds>() .ToList(); return(idValues.Select(id => QuestVO.Create(id.ToString())) .ToList()); }
private void Load() { var offeredIdList = ES3.Load <List <string> >(OfferedQuestListSaveKey , defaultValue: new List <string>()); var completedIdList = ES3.Load <List <string> >(CompletedQuestListSaveKey , defaultValue: new List <string>()); offeredQuestList = offeredIdList.Select(id => QuestVO.Create(id)) .ToList(); completedQuestList = completedIdList.Select(id => QuestVO.Create(id)) .ToList(); }
/// <summary> /// クエストを受領 /// </summary> public void OfferQuest(string rowId) { if (offeredQuestList == null) { offeredQuestList = new List <QuestVO>(); } var isOffered = offeredQuestList.Any(offered => offered.id == rowId); if (isOffered) { Debug.Log("既に受領しているクエストです"); return; } var vo = QuestVO.Create(rowId); offeredQuestList.Add(vo); Debug.Log($"Offered Quest {rowId}"); Save(); }