예제 #1
0
파일: Floor.cs 프로젝트: Midimistro/Deadmen
 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
 }
예제 #2
0
        private string SerializeToXML(Room room)
        {
            using (var stringWriter = new StringWriter())
            {
                var outputStringBuilder = new XmlSerializer(typeof(Room));
                outputStringBuilder.Serialize(stringWriter, this);

                return stringWriter.ToString();
            }
        }
예제 #3
0
파일: Room.cs 프로젝트: Midimistro/Deadmen
        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;
        }
예제 #4
0
 public void SaveRecordRoom(Room RecordedRoom)
 {
     _writer.Write(SerializeToXML(RecordedRoom), _writer.DataFilePath(string.Format("RecordedRoom_{0}", templateRooms.ToString())));
 }
예제 #5
0
 public void SaveTemplateRoom(Room TemplateRoom)
 {
     _writer.Write(SerializeToXML(TemplateRoom), _writer.DataFilePath(string.Format("TemplateRoom_{0}",templateRooms.ToString())));
     templateRooms++;
 }