void IXleSerializable.ReadData(XleSerializationInfo info) { mMapName = info.ReadString("MapName"); mMapID = info.ReadInt32("MapID"); ExtenderName = info.ReadString("ExtenderName", ""); if (info.ContainsKey("EntryPoints")) { EntryPoints = info.ReadList <EntryPoint>("EntryPoints"); } if (info.ContainsKey("Tileset")) { mTileImage = info.ReadString("Tileset"); } else { mTileImage = info.ReadString("TileImage"); mTileSet = info.ReadObject <TileSet>("TileSet"); } var defaultTile = info.ReadInt32("DefaultTile", 0); mOutsideTile = info.ReadInt32("OutsideTile", 0); if (mOutsideTile == 0) { mOutsideTile = defaultTile; } mEvents.AddRange(info.ReadArray <XleEvent>("Events")); if (info.ContainsKey("Roofs")) { Roofs = info.ReadList <Roof>("Roofs"); } if (info.ContainsKey("Guards")) { Guards = info.ReadObject <GuardList>("Guards"); } // read events ReadData(info); SetChestIDs(); }
void IXleSerializable.ReadData(XleSerializationInfo info) { int[] tiles = info.ReadArray <int>("Tiles"); for (int i = 0; i < tiles.Length; i++) { mTiles[i] = (TileInfo)tiles[i]; } if (info.ContainsKey("TileGroups")) { TileGroups = info.ReadList <TileGroup>("TileGroups"); } if (TileGroups == null) { TileGroups = new List <TileGroup>(); } }