예제 #1
0
    private void CheckShopPrices(ShopItem item)
    {
        if (item.isUnlocked)
        {
            if (item.itemCost <= TotalGold)
            {
                //Debug.Log("item.name: " + item.name);

                item.Activate();
            }
            else
            {
                item.Deactivate();
            }
        }
    }
예제 #2
0
 private void CheckShopPrices()
 {
     for (int i = 0; i < shopItemsArray.Length; i++)
     {
         ShopItem item = shopItemsArray[i];
         if (item.isUnlocked)
         {
             if (item.itemCost <= TotalGold)
             {
                 item.Activate();
             }
             else
             {
                 item.Deactivate();
             }
         }
     }
 }