Пример #1
0
 public RepositoryIngredientObject(int id, string name, int maxIngridientNumber, ItemNumber <Ingredient> ingredient)
 {
     Id   = id;
     Name = name;
     MaxIngridientNumber = maxIngridientNumber;
     Ingredient          = ingredient;
 }
Пример #2
0
 public IngredientObject(string name, int x, int y, int maxIngridientNumber, ItemNumber <Ingredient> ingredient)
 {
     Name = name;
     X    = x;
     Y    = y;
     MaxIngridientNumber = maxIngridientNumber;
     Ingredient          = ingredient;
     CanInteract         = true;
     UpdateTime          = DateTime.Now;
 }
Пример #3
0
 public Character(string name, int x, int y, List <CommunicationType> characterCommunicationTypes, Dialog dialog, ItemNumber <Thing> dialogGoodResultThing, List <Thing> shopThings)
 {
     Name = name;
     X    = x;
     Y    = y;
     CommunicationTypes    = characterCommunicationTypes;
     Dialog                = dialog;
     DialogGoodResultThing = dialogGoodResultThing;
     ShopThings            = shopThings;
 }
Пример #4
0
 public void Add(ItemNumber <Ingredient> ingredientItem)
 {
     if (Ingredients.Any(t => t.Item.Type == ingredientItem.Item.Type))
     {
         Ingredients.Find(t => t.Item.Type == ingredientItem.Item.Type).Number += ingredientItem.Number;
     }
     else
     {
         Ingredients.Add(ingredientItem);
     }
 }
Пример #5
0
 public void Add(ItemNumber <Thing> thingItem)
 {
     if (Things.Any(t => t.Item.Name == thingItem.Item.Name))
     {
         Things.Find(t => t.Item.Name == thingItem.Item.Name).Number += thingItem.Number;
     }
     else
     {
         Things.Add(new ItemNumber <Thing>(thingItem.Number, thingItem.Item));
     }
 }