Beispiel #1
0
    public void ClearCurrentRecipe()
    {
        craftableItem = null;
        craftedSlot.ClearSlot();

        foreach (CraftingSlot slot in ingredientSlots)
        {
            slot.ClearSlot();
        }
    }
Beispiel #2
0
    public void SetCurrentRecipe(QI_CraftingRecipe itemToCraft)
    {
        ClearCurrentRecipe();
        craftableItem = itemToCraft;
        craftedSlot.AddItem(craftableItem.Product.Item, craftableItem.Product.Amount, this);



        for (int i = 0; i < craftableItem.Ingredients.Count; i++)
        {
            ingredientSlots[i].AddItem(craftableItem.Ingredients[i].Item, craftableItem.Ingredients[i].Amount, inventory.GetStock(craftableItem.Ingredients[i].Item.Name));
        }
    }
 void ClearSlot()
 {
     item            = null;
     recipeName.text = "";
 }
 public void AddItem(QI_CraftingRecipe newItem, CraftingTable craftingTable)
 {
     item               = newItem;
     recipeName.text    = item.Name;
     this.craftingTable = craftingTable;
 }