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

            foreach (PropertyInfo propertyInfo in this.GetType().GetProperties())
            {
                propertyInfo.SetValue(clone, propertyInfo.GetValue(this));
            }
            return(clone);
        }
Beispiel #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;
     }
 }
Beispiel #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;
     }
 }