示例#1
0
        protected Item(string name, int itemValue, string type, Location location = null)
            : base(name)
        {
            this.Value = itemValue;

            foreach (var itemType in (ItemType[])Enum.GetValues(typeof(ItemType)))
            {
                if (itemType.ToString() == type)
                {
                    this.ItemType = itemType;
                }
            }
        }
示例#2
0
 public Armor(string name, Location location = null)
     : base(name, Armor.GeneralArmorValue, ItemType.Armor, location)
 {
 }
示例#3
0
 public Weapon(string name, Location location = null)
     : base(name, Weapon.MoneyValue, ItemType.Weapon, location)
 {
 }
示例#4
0
 public Wood(string name, Location location = null)
     : base(name, Wood.MoneyValue, ItemType.Wood, location)
 {
 }
示例#5
0
 protected Item(string name, int itemValue, ItemType type, Location location = null)
     : base(name)
 {
     this.Value = itemValue;
     this.ItemType = type;
 }