ClosestInteractionZone() public method

Get the closest interaction zone to the specified position.
public ClosestInteractionZone ( Vector3 position ) : GameObject
position UnityEngine.Vector3 A world position to test for proximity to this checkouts interaction zones.
return UnityEngine.GameObject
コード例 #1
0
        public Queue(Customer customer, Checkout checkout)
            : base(customer)
        {
            this.checkout = checkout;
            interactionZone = checkout.ClosestInteractionZone(customer.transform.position);

            // Move to closest checkout interaction zone
            moveControl.SetDestination(interactionZone.transform.position);

            // Clear thought bubble
            customer.Think(null);
        }