示例#1
0
 public void AddFood(Enums.Foodtype type, int amount)
 {
     FoodCount[FoodCount.FindIndex(x => x.foodtype == type)] = new Food()
     {
         foodtype = type, Amount = amount
     };
 }
示例#2
0
 public int GetFood(Enums.Foodtype type)
 {
     return(database.GetFood(type));
 }
示例#3
0
 public int GetFood(Enums.Foodtype type)
 {
     return(FoodCount.Where(x => x.foodtype == type).Select(x => x.Amount).First());
 }
示例#4
0
 public void AddFood(Enums.Foodtype type, int amount)
 {
     database.AddFood(type, amount);
 }