/// <summary> /// When the customer has reach its waiting limit (called from <see cref="Customer"/>) /// </summary> /// <param name="customer"></param> public void ACustomerIsLeaving(Customer customer) { if (_displayInformationInConsole) { Debug.Log($"The customer {customer.name} leaves the store."); } foreach (GameObject go in _lanes) { Lane lane = go.GetComponent <Lane>(); if (lane.CurrentCustomer == customer) { lane.CustomerLeft(); return; } } foreach (Customer c in _waitingCustomers) { if (c == customer) { _waitingCustomers = new Queue <Customer>(_waitingCustomers.Where(x => x != c)); return; } } Debug.LogError("Shouldn't reach here (LaneController.TheCustomerIsLeaving)"); }