public void Init() { m_DrinkItemList.Clear(); for (int i = 1; i <= 16; i++) { DrinkItem tmp = new DrinkItem(); tmp.DrinkPostion = i; tmp.DrinkName = "NoRecipe"; tmp.DrinkID = 0; m_DrinkItemList.Add(tmp); } }
public void Modify(DrinkItem a) { DrinkItem tmp = m_DrinkItemList.First(c => c.DrinkPostion == a.DrinkPostion); if (tmp != null) { tmp.DrinkName = a.DrinkName; tmp.DrinkID = a.DrinkID; } else { throw new EVOException("Error:001"); } }