Ejemplo n.º 1
0
    void MakeShopSlots(InventoryItems itemName)
    {
        GameObject itemTemp = Instantiate(shopSlot, ShopBoard.transform.position, Quaternion.identity);

        itemTemp.transform.SetParent(ShopBoard.transform);
        ShopSlot newSlot = itemTemp.GetComponent <ShopSlot>();

        if (newSlot)
        {
            newSlot.Setup(itemName, this);
        }
    }
Ejemplo n.º 2
0
 private void MakeShopInventorySlots()
 {
     if (shopInventory)
     {
         for (int i = 0; i < shopInventory.myShopInventory.Count; i++)
         {
             var tempSlot = Instantiate(blankShopSlot, contentPanel.transform.position, Quaternion.identity);
             tempSlot.transform.SetParent(contentPanel.transform, false);
             ShopSlot newSlot = tempSlot.GetComponent <ShopSlot>();
             if (tempSlot)
             {
                 newSlot.Setup(shopInventory.myShopInventory[i], this);
             }
         }
         ShopSlot.Singleton.InitialCheck();
     }
 }