示例#1
0
文件: Row.cs 项目: beursken/Crawler
 public void AddActor(Actor a, int x = -1)
 {
     if (x == -1)
     {
         foreach (Tile cell in _cols)
         {
             cell.AddActor(a);
         }
     }
     else
     {
         _cols[x].AddActor(a);
     };
 }
示例#2
0
文件: Tile.cs 项目: beursken/Crawler
 public void AddActor(Actor a)
 {
     _actors.Add(a);
 }
示例#3
0
文件: Tile.cs 项目: beursken/Crawler
        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);
        }