public void OnDeselect(vItemSlot slot) { if (equipSlots.Contains(slot as vEquipSlot)) { currentSelectedSlot = null; } }
public void OnSubmitSlot(vItemSlot slot) { if (itemPicker != null) { currentSelectedSlot = slot as vEquipSlot; itemPicker.gameObject.SetActive(true); itemPicker.CreateEquipmentWindow(inventory.items, currentSelectedSlot.itemType, slot.item, OnPickItem); } }
public void RemoveItem(vEquipSlot slot) { if (slot) { vItem item = slot.item; if (ValidSlots[indexOfEquipedItem].item == item) { lastEquipedItem = item; } slot.RemoveItem(); onUnequipItem.Invoke(this, item); } }
public void OnSelectSlot(vItemSlot slot) { if (equipSlots.Contains(slot as vEquipSlot)) { currentSelectedSlot = slot as vEquipSlot; } else { currentSelectedSlot = null; } onSelectEquipArea.Invoke(this); if (itemtext != null) { if (slot.item == null) { itemtext.text = ""; } else { text = new StringBuilder(); text.Append(slot.item.name + "\n"); text.AppendLine(slot.item.description); if (slot.item.attributes != null) { for (int i = 0; i < slot.item.attributes.Count; i++) { var _text = InsertSpaceBeforeUpperCAse(slot.item.attributes[i].name.ToString()); text.AppendLine(_text + " : " + slot.item.attributes[i].value.ToString()); } } itemtext.text = text.ToString(); } } }
public void OnDeselect(vItemSlot slot) { currentSelectedSlot = null; }
public void OnSelectSlot(vItemSlot slot) { currentSelectedSlot = slot as vEquipSlot; }