Exemplo n.º 1
0
 /** Creates an empty dungeon of the given dimentions */
 public void Initialize(int width, int height, int floors)
 {
     Floor    = new MDRMap[floors + 1];
     Floor[0] = new MDRMap();
     Floor[0].Initialize(Width, Height);
     Floor[0].FloorNumber = 0;
     for (int lp = 1; lp <= floors; lp++)
     {
         Floor[lp] = new MDRMap();
         Floor[lp].Initialize(width, height);
         Floor[lp].FloorNumber = lp;
     }
 }
Exemplo n.º 2
0
        public override void ReadNode(XElement node)
        {
            base.ReadNode(node);

            Floor = new MDRMap[node.Elements("Floor").Count() + 1];

            Floor[0] = new MDRMap();
            Floor[0].Initialize(Width, Height);

            foreach (XElement subNode in node.Elements("Floor"))
            {
                MDRMap map = new MDRMap();
                map.ReadNode(subNode);
                if (map.FloorNumber > MAX_FLOORS)
                {
                    Trace.LogError("Too many floors in dungeon (" + map.FloorNumber + "), a maximum of " + MAX_FLOORS + " is allowed.");
                }
                Floor[map.FloorNumber] = map;
            }
        }
Exemplo n.º 3
0
 public FieldRecord(int atX, int atY, MDRMap parentMap)
 {
     this._x  = atX;
     this._y  = atY;
     this.map = parentMap;
 }