Example #1
0
 private void LeaveQueueOnCustomerOrderComplete(string key, bool remainInScene)
 {
     if (CustomerQueueHeadManager.TryGetCustomerQueueHead(key, out CustomerQueueHead queueHead))
     {
         queueHead.StartCoroutine(MoveFromView(remainInScene));
     }
 }
        private void SpawnCustomersAtQueueHead(string queueHead = "", params CustomerOrder[] orders)
        {
            bool validQueuePosition = CustomerQueueHeadManager.TryGetCustomerQueueHead(queueHead, out CustomerQueueHead head);

            if (validQueuePosition)
            {
                for (int i = 0; i < orders.Length; i++)
                {
                    activeOrders.Enqueue(orders[i]);

                    CustomerNpc customer = CustomerNpcSpawner.GetCustomerNpcPrefab();
                    customer.SetCustomerAppearence(orders[i].NpcId);

                    head.EnqueueCustomers(customer);
                }
            }
        }