예제 #1
0
        public void SetData(RecipeList recipeList, IntListSO discoveredRecipes, InventorySO inventorySO)
        {
            this.recipeList        = recipeList;
            this.discoveredRecipes = discoveredRecipes;

            this._inventory = inventorySO;
        }
예제 #2
0
        private void PopulateRecipeIDs(IntListSO target)
        {
            var recipes = AssetsUtility.FindAllAssets <Recipe>();

            target.ints = new System.Collections.Generic.List <int>();

            for (int i = 0; i < recipes.Length; i++)
            {
                target.ints.Add(recipes[i].id);
            }
        }
예제 #3
0
        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;
                }
            }
        }