예제 #1
0
 public void AddItemToShop(EquippableItem item)
 {
     if (inventory.Count < shopCapacity)
     {
         inventory.Add(item);
         if (shopUI)
         {
             shopUI.UpdateUI();
         }
     }
     else
     {
         MessageSystem.Print("Inventory is full.");
     }
 }
예제 #2
0
        private void ToggleShop()
        {
            shopContainer = GameObject.Find("Shop");
            GameObject shopPanelGO = shopContainer.transform.Find("ShopPanel").gameObject;
            ShopUI     shopUI      = shopPanelGO.GetComponent <ShopUI>();

            shopUI.TogglePanel();
            shopUI.UpdateUI();
        }