private void Combine(Pickupable item1, Pickupable item2) { Item newItem = GetCombination(item1.item, item2.item); if (newItem) { Destroy(item1.gameObject); Destroy(item2.gameObject); if (!itemManager.unlockedItems.Contains(newItem)) { itemManager.UnlockItem(newItem); } SoundManager.instance.Play("CombineItems"); itemCreator.InstantiateItem(newItem, outputSpot.position, 1.1f); } else { SoundManager.instance.Play("WrongAnswer"); popupManager.ShowPopup("That doesn't seem to be a recipe", 2f); } }
private void CreateItem(Item item) { SoundManager.instance.Play("CreateItem"); itemCreator.InstantiateItem(item, itemCreator.transform.position); }