示例#1
0
文件: UnitModels.cs 项目: svinot/LJSM
        public GearItem Clone()
        {
            GearItem clone = new GearItem {
            };

            foreach (PropertyInfo propertyInfo in this.GetType().GetProperties())
            {
                propertyInfo.SetValue(clone, propertyInfo.GetValue(this));
            }
            return(clone);
        }
示例#2
0
文件: UnitModels.cs 项目: svinot/LJSM
 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;
     }
 }
示例#3
0
文件: UnitModels.cs 项目: svinot/LJSM
 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;
     }
 }