void OnEndCraft() { Destroy(currCraft.gameObject); currCraft = null; while (currCraft == null && itemsQueueUI.Count != 0) { currCraft = itemsQueueUI.Dequeue(); } if (currCraft != null) { craftingPlace.Craft(currCraft.craft); } else { craftingPlace.ResetCraftTime(); } }
void TryCraft() { if (!isCrafting && selectedCraft) { if (inventoryToRemoveItem.CheckIsEnoughIngradients(selectedCraft)) { isCrafting = true; foreach (var ingradient in selectedCraft.ingradients) { inventoryToRemoveItem.RemoveItem(ingradient.CloneItem()); } craftingPlace.Craft(selectedCraft); } else { craftingPlace.ResetCraftTime(); } } }