public GameMap () { CMapGenerator map = new CMapGenerator (); Cells = new Cell[map.MapSize.Size]; PlayerStart = map.PlayerStart; Size = map.MapSize; for (int i = 0; i < Size.Size; i++) { Cells [i] = new Cell (); Cells [i].SetTile (CreateTile (map.Tiles [i], i)); } }
public GameMap (string mapName) { CMapFile map = new CMapFile (mapName); Cells = new Cell[map.MapSize.Size]; PlayerStart = map.PlayerStart; Size = map.MapSize; for (int i = 0; i < Size.Size; i++) { Cells [i] = new Cell (); Cells [i].SetTile (CreateTile (map.Tiles [i], i)); } }