/// <summary> /// Calls the generate recipe function in RecipeGenerator, and sets the chef's canvas to the returned list of ingredients /// Also sets the name of the recipe /// </summary> public void GenerateAndSetNewRecipe() { List <string> recipe = RG.GenerateRecipe(numberOfPlayers); int x = 0; foreach (string ingredient in recipe) { if (chefsRecipeList[x] == null) { break; } chefsRecipeList[x].text = ingredient; x++; } //Set the text and the images recipeName.text = RG.GetCurrentRecipeName(); }