public override void Init() { MapCsv mapCsv = CsvManager.Inst.GetCsv <MapCsv>(eCSV.eMap); //MapData data = mapCsv.m_mapDataDic[3]; Lobby map = new Lobby(3, null); dicLobby[3] = map; Console.WriteLine("大厅初始化完毕"); }
public static void Init(string _path) { Dictionary <int, MapCsv> csvDic = StaticData.Instance.GetDic <MapCsv>(); Dictionary <int, MapCsv> .Enumerator enumerator = csvDic.GetEnumerator(); while (enumerator.MoveNext()) { MapCsv csv = enumerator.Current.Value; using (FileStream fs = new FileStream(_path + "/map/" + csv.mapName, FileMode.Open)) { MapDataUnit unit = new MapDataUnit(); unit.Init(fs); dic.Add(enumerator.Current.Key, unit); } } }