public Floor() { Rooms = new Dictionary<KeyValuePair<int,int>, Room>(); Rooms[new KeyValuePair<int, int>(0, 0)] = new Room(); //stubbed attempt Rooms[new KeyValuePair<int, int>(0, 1)] = new Room(); //stubbed attempt Rooms[new KeyValuePair<int, int>(1, 0)] = new Room(); //stubbed attempt Rooms[new KeyValuePair<int, int>(-1, 0)] = new Room(); //stubbed attempt Rooms[new KeyValuePair<int, int>(0, -1)] = new Room(); //stubbed attempt }
private string SerializeToXML(Room room) { using (var stringWriter = new StringWriter()) { var outputStringBuilder = new XmlSerializer(typeof(Room)); outputStringBuilder.Serialize(stringWriter, this); return stringWriter.ToString(); } }
public Room() { Mobiles = new List<Mobile>(); Events = new List<GameEvent>(); Obstacles = new List<Obstacle>(); SkylineObjects = new List<SkylineObject>(); West = null; East = null; North = null; South = null; Width = 12; Depth = 8; }
public void SaveRecordRoom(Room RecordedRoom) { _writer.Write(SerializeToXML(RecordedRoom), _writer.DataFilePath(string.Format("RecordedRoom_{0}", templateRooms.ToString()))); }
public void SaveTemplateRoom(Room TemplateRoom) { _writer.Write(SerializeToXML(TemplateRoom), _writer.DataFilePath(string.Format("TemplateRoom_{0}",templateRooms.ToString()))); templateRooms++; }