ClosestInteractionZone() публичный Метод

Get the closest shelf interaction zone to the specified position.
public ClosestInteractionZone ( Vector3 position ) : GameObject
position UnityEngine.Vector3 A world position to test for proximity to this shelves interaction zones.
Результат UnityEngine.GameObject
        public AddToCart(Customer customer, string desiredProduct, Shelf shelf)
            : base(customer)
        {
            this.desiredProduct = desiredProduct;
            this.shelf = shelf;

            interactionZone = shelf.ClosestInteractionZone(customer.Position);
            Vector3 destination = interactionZone.transform.position;
            moveControl.SetDestination(destination);

            // Think about the desired product
            GameObject product = supermarket.Catalogue[desiredProduct].Model;
            customer.Think(product);
        }
 void NextEmptyShelf()
 {
     shelfToStock = supermarket.NextEmptyShelf();
     if (shelfToStock != null)
     {
         //go stock the shelf
         interactionZone = shelfToStock.ClosestInteractionZone(staff.Position);
         Vector3 destination = interactionZone.transform.position;
         moveControl.SetDestination(destination);
     }
     else
     {
         staff.SetState(new Wander(staff));
     }
 }