Пример #1
0
 public void EndDialog()
 {
     if (DialogType == 0)
     {
         InTrade = true;
         SellUi.gameObject.GetComponent <Canvas>().enabled = true;
         InventoryUi.CloseInventory();
         SellUi.RefreshSellInventory();
         InventoryUi.gameObject.GetComponent <Canvas>().enabled = false;
     }
     if (DialogType == 1)
     {
         InShop = true;
         BuyUi.gameObject.GetComponent <Canvas>().enabled = true;
         InventoryUi.CloseInventory();
         BuyUi.RefreshBuyInventory();
         InventoryUi.gameObject.GetComponent <Canvas>().enabled = false;
     }
     DialogUi.GetComponent <Canvas>().enabled = false;
     StartCoroutine(AntiDialogSpam());
     DialogIndex = 0;
 }
Пример #2
0
 public void PickUpItem(Item item, float amount)
 {
     if (item.itemspriteid != 4)
     {
         AddToInventory(item, amount);
     }
     else
     {
         if (item.itemspriteid == 4)
         {
             gold += amount;
         }
     }
     if (InventoryUi.enabled)
     {
         InventoryUi.gameObject.GetComponent <InventoryUiScript>().RefreshInventory();
     }
     if (dialogmanager.InTrade)
     {
         SellUi.RefreshSellInventory();
     }
     BuyUi.RefreshBuyInventory();
     InventoryUi.GetComponent <InventoryUiScript>().DrawInventory();
 }