public static void parsing(string iostring) { List <STFish> list = getList(); Dictionary <int, STFish> map = getMap(); list.Clear(); map.Clear(); ConvertModel buf = ConvertModel.getInstance(); buf.setting(iostring); STFish sTFish; while (!buf.limit()) { sTFish = new STFish(); sTFish.id = buf.readInt(); sTFish.life = buf.readInt(); sTFish.name = buf.readString(); sTFish.speed = buf.readFloat(); sTFish.diamond = buf.readInt(); sTFish.coin = buf.readInt(); sTFish.prop = buf.readInt(); list.Add(sTFish); map.Add(sTFish.Id, sTFish); } }
public static void parsing(string iostring) { List <STChapter> list = getList(); Dictionary <int, STChapter> map = getMap(); list.Clear(); map.Clear(); ConvertModel buf = ConvertModel.getInstance(); buf.setting(iostring); STChapter sTChapter; while (!buf.limit()) { sTChapter = new STChapter(); sTChapter.id = buf.readInt(); sTChapter.sOF = buf.readArray(); list.Add(sTChapter); map.Add(sTChapter.Id, sTChapter); } }