Exemplo n.º 1
0
 void AddToInventary(Inventary.Item _item)
 {
     Invoke("Delayed", 0.75f);
     Inventary.Item item = Data.Instance.inventary.GetItem(_item.gameProgressKey);
     image.sprite = item.image;
     Invoke("Close", 1.5f);
 }
Exemplo n.º 2
0
    void AddNotLibro(Inventary.Item item)
    {
        InventaryButton newBbutton = Instantiate(button_not_Libro);

        newBbutton.transform.SetParent(container_not_Libro);
        newBbutton.transform.localScale = Vector3.one;
        newBbutton.Init(item);
    }
Exemplo n.º 3
0
 void AddToInventary(Inventary.Item item)
 {
     if (item.isLibro)
     {
         asource.PlayOneShot(getBook);
     }
     else
     {
         asource.PlayOneShot(getItem);
     }
 }
Exemplo n.º 4
0
 void AddToInventary(Inventary.Item item)
 {
     if (item.isLibro)
     {
         int totalItems = Data.Instance.inventary.GetTotalLibros();
         if (totalItems == 0)
         {
             inventaryButton.gameObject.SetActive(false);
             nums.SetActive(false);
         }
         else
         {
             nums.SetActive(true);
             inventaryButton.gameObject.SetActive(true);
             qty.text = Data.Instance.inventary.GetTotalLibros().ToString();
         }
     }
     else
     {
         AddNotLibro(item);
     }
 }
Exemplo n.º 5
0
 public void Init(Inventary.Item item)
 {
     this.item    = item;
     image.sprite = item.image;
 }