public void SetData(RecipeList recipeList, IntListSO discoveredRecipes, InventorySO inventorySO) { this.recipeList = recipeList; this.discoveredRecipes = discoveredRecipes; this._inventory = inventorySO; }
private void Open(RecipeList recipeList) { if (disabledFrame == Time.frameCount) { return; } SetData(recipeList, discoveredRecipes, _inventory); gameObject.SetActive(true); }
public void SetData(RecipeList recipeList, IntListSO discoveredRecipes, InventorySO inventorySO) { this.recipeList = recipeList; this.discoveredRecipes = discoveredRecipes; if (this._inventory != inventorySO) { if (this.isActiveAndEnabled) { inventory.OnContentsChanged -= UpdateInventorySlots; this._inventory = inventorySO; inventory.OnContentsChanged += UpdateInventorySlots; UpdateInventorySlots(null, 0); } else { this._inventory = inventorySO; } } }
public static void RequestCraftingMenu(RecipeList recipeList) => OnCraftingMenuRequested?.Invoke(recipeList);