Пример #1
0
        // 2. Each x seconds (as defind in GameStarter script) 1 customer enters the kitchen, moves to a pre defined free random point and stops
        public void AddCustomer(NewCustomer customer)
        {
            ListOfCustomersWandering.Add(customer);

            bool freePointFound = false;

            while (!freePointFound)
            {
                NewPoint point = ListOfKitchenMovePoints[Random.Range(0, 10)];

                if (point.Free)
                {
                    customer.MoveTo(point);
                    point.Free     = false;
                    freePointFound = true;
                }
            }
        }
Пример #2
0
 //If Mr. Todd invites the customer to tour the kitchen this will trigger
 public void SendFirstInQueueToKitchenDoor()
 {
     if (ListOfCustomersInQ.Count > 0)
     {
         if (!Kitchen.customerIsOnTheTour)
         {
             Kitchen.customerIsOnTheTour = true;
             NewCustomer customer = ListOfCustomersInQ[0];
             ListOfCustomersInQ.Remove(customer);
             RelocateAllCustomers();
             store.AddToKitchenDoor(customer);
             pause.Nevermind();
         }
         else
         {
             Debug.Log("There is already someone touring the kitchen");
         }
     }
     else
     {
         Debug.Log("There isn't any customers in the queue");
     }
 }
Пример #3
0
 public void AddCustomer(NewCustomer customer)
 {
     ListOfCustomersInQ.Add(customer);
     customer.MoveTo(ListOfPoints[ListOfCustomersInQ.IndexOf(customer)]);
 }