public void ConstructFlavourList() { List <string> flavorNames = LoadFlavourNameString(); foreach (string flavorName in flavorNames) { GameObject flavorGO = GameObject.Instantiate(ListItemContainerTemplate); flavorGO.transform.parent = _flavorNameView.content; FlavorItemContainer container = flavorGO.GetComponent <FlavorItemContainer>(); container.Init(this, flavorName); } }
public void ReduceFlavorOnCurRecipe(FlavorItemContainer listItem) { bool isFound = false; foreach (OperatingRecipeFlavorListItem item in _curFlavorList) { if (item.GetName() == listItem.GetName()) { isFound = true; break; } } if (isFound) { ModifyExistingFlavourItem(listItem.GetName(), false); } }