Example #1
0
    ////////////////////////////////////////////

    public void AddItemToCharbyID(int id)
    {
        Item additem = itemDatabase.GetItem(id);

        charItems.Add(additem);
        Debug.Log("İtem Added" + additem.Name);
    }
Example #2
0
    public void GiveItem(int id)
    {
        Item toAddItem = itemDataBase.GetItem(id);

        characterItem.Add(toAddItem);
        uiInventory.AddNewItem(toAddItem);
        Debug.Log("AddItem : " + toAddItem.title);
    }
Example #3
0
    public void GiveItem(int id)
    {
        Item itemToAdd = ItemDataBase.GetItem(id);

        playerItems.Add(itemToAdd);
        inventoryUI.AddNewItem(itemToAdd);
        Debug.Log("added item:" + itemToAdd.title);
    }
Example #4
0
 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;;
        }
    }
Example #6
0
    // Use this for initialization
    void Start()
    {
        Item item = ItemDataBase.GetItem(ID);

        GetComponent <SpriteRenderer>().sprite = item.itemSprite;
    }