Esempio n. 1
0
        public void CompleteOrder(int Id)
        {
            Order tmp = ActiveOrders.Find(x => x.Id == Id);

            CompletedOrders.Add(new Order(tmp.Id, tmp.Client, tmp.OrderDate, tmp.Dishes, tmp.Delivery, tmp.DeliveryAdress, tmp.DeliveryEndTime));
            CompletedOrders[CompletedOrders.Count - 1].CompleteOrderDate = DateTime.Now;
            ActiveOrders.RemoveAll(x => x.Id == Id);
        }
Esempio n. 2
0
        public void Update(float deltaTime)
        {
            foreach (Pair <Order, float> order in ActiveOrders)
            {
                order.Second -= deltaTime;
            }
            ActiveOrders.RemoveAll(o => o.Second <= 0.0f);

            UpdateConversations(deltaTime);
            UpdateProjectSpecific(deltaTime);
        }
        public void Update(float deltaTime)
        {
            foreach (Pair <Order, float?> order in ActiveOrders)
            {
                if (order.Second.HasValue)
                {
                    order.Second -= deltaTime;
                }
            }
            ActiveOrders.RemoveAll(o => o.Second.HasValue && o.Second <= 0.0f);

            UpdateConversations(deltaTime);
            UpdateProjectSpecific(deltaTime);
            ActiveReadyCheck?.Update(deltaTime);
            if (ActiveReadyCheck != null && ActiveReadyCheck.IsFinished)
            {
                ActiveReadyCheck = null;
            }
        }
Esempio n. 4
0
 public void RemoveOrder(Order order)
 {
     ActiveOrders.RemoveAll(o => o.First == order);
 }