Exemplo n.º 1
0
 public void UpdateEquipment()
 {
     for (int i = 0; i < this.m_VisibleItems.Count; i++)
     {
         VisibleItem visibleItem = this.m_VisibleItems[i];
         visibleItem.OnItemUnEquip(visibleItem.item);
     }
     EquipmentItem[] containerItems = this.m_EquipmentContainer.GetItems <EquipmentItem>();
     foreach (EquipmentItem item in containerItems)
     {
         EquipItem(item);
     }
 }
Exemplo n.º 2
0
 public void UnEquipItem(EquipmentItem item)
 {
     foreach (ObjectProperty property in item.GetProperties())
     {
         if (property.SerializedType == typeof(int) || property.SerializedType == typeof(float))
         {
             SendMessage("RemoveModifiersFromSource", new object[] { property.Name, item }, SendMessageOptions.DontRequireReceiver);
         }
     }
     for (int i = 0; i < this.m_VisibleItems.Count; i++)
     {
         VisibleItem visibleItem = this.m_VisibleItems[i];
         if (visibleItem.item.Id == item.Id)
         {
             visibleItem.OnItemUnEquip(item);
             break;
         }
     }
 }