Exemplo n.º 1
0
 public virtual IPlace DropItemOnto(Item i)
 {
     Chest chest = new Chest("Rubble on the ground", new Inventory(100));
     chest.Content.Add(i);
     return chest;
 }
Exemplo n.º 2
0
 public Chest BecameCorpse()
 {
     foreach (Equipment e in this.equiped.bag)
     {
         this.bag.Add(e);
     }
     Chest thisCorpse = new Chest(string.Format("Corpse of {0}", this.Name), this.bag);
     return thisCorpse;
 }
Exemplo n.º 3
0
 public static Chest LoadChestFromXml(XmlElement node)
 {
     string name = node.Attributes["name"].Value;
     bool removeIfEmpty = bool.Parse(node.Attributes["removeIfEmpty"].Value);
     string symbol = node.Attributes["symbol"].Value;
     XmlElement child = (XmlElement)node.GetElementsByTagName("Inventory")[0];
     Inventory inv = LoadInventoryFromXml(child);
     Chest chest = new Chest(name, inv);
     chest.SetSymbol(symbol);
     chest.SetRemoving(removeIfEmpty);
     return chest;
 }