/** * <summary>The default Constructor.</summary> * <param name = "idArray">An array of already-used ID numbers, so that a unique one can be generated</param> */ public Recipe(int[] idArray) { #if UNITY_EDITOR isEditing = false; #endif ingredients = new List <Ingredient>(); resultID = 0; useSpecificSlots = false; invActionList = null; autoCreate = true; onCreateRecipe = OnCreateRecipe.JustMoveToInventory; actionListOnCreate = null; // Update id based on array foreach (int _id in idArray) { if (id == _id) { id++; } } label = "Recipe " + (id + 1).ToString(); }
public Recipe (int[] idArray) { isEditing = false; ingredients = new List<Ingredient>(); resultID = 0; useSpecificSlots = false; invActionList = null; autoCreate = true; onCreateRecipe = OnCreateRecipe.JustMoveToInventory; // Update id based on array foreach (int _id in idArray) { if (id == _id) id ++; } label = "Recipe " + (id + 1).ToString (); }