//////////////////////////////////////////// public void AddItemToCharbyID(int id) { Item additem = itemDatabase.GetItem(id); charItems.Add(additem); Debug.Log("İtem Added" + additem.Name); }
public void GiveItem(int id) { Item toAddItem = itemDataBase.GetItem(id); characterItem.Add(toAddItem); uiInventory.AddNewItem(toAddItem); Debug.Log("AddItem : " + toAddItem.title); }
public void GiveItem(int id) { Item itemToAdd = ItemDataBase.GetItem(id); playerItems.Add(itemToAdd); inventoryUI.AddNewItem(itemToAdd); Debug.Log("added item:" + itemToAdd.title); }
public void GiveItem(int id) { if (characterItems.Count < sizeOfInventory) { Item itemToAdd = ItemDataBase.GetItem(id); characterItems.Add(itemToAdd); inventoryUI.AddNewItem(itemToAdd); Debug.Log("Added item: " + itemToAdd.title); } }
//update id- update information panel with item[ID] public void UpdateID(int ID) { Item item = ItemDataBase.GetItem(ID); currentItem = item; if (currentItem == null) { } else { _text.text = "" + currentItem.VietnameseDesc; _spriteSignal.GetComponent <Image>().sprite = currentItem.iconSprite; WarningText.text = _text.text; WarningSignal.GetComponent <Image>().sprite = currentItem.iconSprite;; } }
// Use this for initialization void Start() { Item item = ItemDataBase.GetItem(ID); GetComponent <SpriteRenderer>().sprite = item.itemSprite; }