Exemple #1
0
        public GearItem Clone()
        {
            GearItem clone = new GearItem {
            };

            foreach (PropertyInfo propertyInfo in this.GetType().GetProperties())
            {
                propertyInfo.SetValue(clone, propertyInfo.GetValue(this));
            }
            return(clone);
        }
Exemple #2
0
 public void setItem(GearItem item)
 {
     if (item.slot == Slot.rightHand)
     {
         this.rightHand = item;
     }
     if (item.slot == Slot.leftHand)
     {
         this.leftHand = item;
     }
     if (item.slot == Slot.head)
     {
         this.head = item;
     }
 }
Exemple #3
0
 public void removeItem(Slot slot)
 {
     if (slot == Slot.rightHand)
     {
         this.rightHand = null;
     }
     if (slot == Slot.leftHand)
     {
         this.leftHand = null;
     }
     if (slot == Slot.head)
     {
         this.head = null;
     }
 }