using System; using System.Collections.Generic; public class PhotoScenePreset { public static void Create() { if (PhotoScenePreset.datas != null) { return; } PhotoScenePreset.datas = new List(); using (AFileBase afileBase = GameUty.FileSystem.FileOpen("phot_scenepreset_list.nei")) { using (CsvParser csvParser = new CsvParser()) { bool condition = csvParser.Open(afileBase); NDebug.Assert(condition, "phot_scenepreset_list.nei\nopen failed."); for (int i = 1; i < csvParser.max_cell_y; i++) { if (csvParser.IsCellToExistData(0, i)) { int num = 0; PhotoScenePreset.Data data = new PhotoScenePreset.Data(); data.id = csvParser.GetCellAsInteger(num++, i); data.sceneName = csvParser.GetCellAsString(num++, i); data.loadFileName = csvParser.GetCellAsString(num++, i); data.thumbnailName = csvParser.GetCellAsString(num++, i); List list = new List(); for (;;) { string cellAsString = csvParser.GetCellAsString(num++, i); if (string.IsNullOrEmpty(cellAsString)) { break; } list.Add(cellAsString); } data.charaFocusImages = list.ToArray(); PhotoScenePreset.datas.Add(data); } } } } } public static List datas { get; private set; } public class Data { public int id; public string sceneName; public string loadFileName; public string thumbnailName; public string[] charaFocusImages; } }