Beispiel #1
0
 public void AddActor(Actor a, int x = -1)
 {
     if (x == -1)
     {
         foreach (Tile cell in _cols)
         {
             cell.AddActor(a);
         }
     }
     else
     {
         _cols[x].AddActor(a);
     };
 }
Beispiel #2
0
 public void AddActor(Actor a)
 {
     _actors.Add(a);
 }
Beispiel #3
0
        public new void Load(XmlTextReader reader)
        {
            reader.Read();
            _description = reader.ReadElementString("description", "");
            _floorStyle = XmlConvert.ToInt32(reader.ReadElementString("floorStyle", ""));
            _wallStyle = XmlConvert.ToInt32(reader.ReadElementString("wallStyle", ""));

            // Solange Placeables da sind
            while (reader.Name == "Placeable")
            {
                Placeable p = new Placeable(0, 0, "");
                p.Load(reader);
                _placeables.Add(p);
                reader.Read();
            }

            // Solange Actors da sind
            while (reader.Name == "Actor")
            {
                Actor a = new Actor();
                a.Load(reader);
                _actors.Add(a);
                reader.Read();
            }
            base.Load(reader);
        }