Exemple #1
0
    public void PlaceBulkOrder(int count)
    {
        var order = potentialOrders[Random.Range(0, potentialOrders.Length)];

        for (int i = 0; i < count; i++)
        {
            CurrentOrders.Add(order);
        }
        OnOrdersChange?.Invoke(CurrentOrders);
    }
Exemple #2
0
 public bool FulfillsAnOrder(Food food)
 {
     foreach (var order in CurrentOrders)
     {
         if (order.product.Name == food.Name)
         {
             CurrentOrders.Remove(order);
             OnOrdersChange?.Invoke(CurrentOrders);
             return(true);
         }
     }
     return(false);
 }
Exemple #3
0
 public Recepie PlaceRandomOrder()
 {
     CurrentOrders.Add(potentialOrders[Random.Range(0, potentialOrders.Length)]);
     OnOrdersChange?.Invoke(CurrentOrders);
     return(CurrentOrders[CurrentOrders.Count - 1]);
 }