public GearItem Clone() { GearItem clone = new GearItem { }; foreach (PropertyInfo propertyInfo in this.GetType().GetProperties()) { propertyInfo.SetValue(clone, propertyInfo.GetValue(this)); } return(clone); }
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; } }
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; } }