Esempio n. 1
0
    public void destroy()
    {
        int cost = ItemDefinitions.getScrapCost(item);

        inventory.removeItem(item);
        inventory.addCurrency(cost);
        inventory.updateCurrency();
        // something with scrap lol
    }
Esempio n. 2
0
 public void itemSelected(ItemAbstract newItem)
 {
     item = newItem;
     if (blueprints.findItem(item))
     {
         int scrap = PlayerPrefs.GetInt("score");
         if (ItemDefinitions.getScrapCost(item) <= scrap)
         {
             enable();
             return;
         }
     }
     disable();
 }
Esempio n. 3
0
 public void alchemize()
 {
     if (blueprints.findItem(item))
     {
         int scrap = PlayerPrefs.GetInt("score");
         int cost  = ItemDefinitions.getScrapCost(item);
         if (cost <= scrap)
         {
             inventory.addItem(item);
             inventory.addCurrency(-cost);
             inventory.updateCurrency();
         }
         //print("you alchemized an item!");
         // something with scrap lol
     }
 }