public override void OnInteract(InteractionZone other) { base.OnInteract(other); // // TODO: dont compare gameObjects instead compare Interactable scripts // // If at checkout if (other.gameObject == interactionZone) { // If checkout is manned if (checkout.Occupied) { // Pay for goods customer.Pay(checkout); // Proceed to the exit customer.SetState(new Exit(customer)); } else { // If checkout is not manned, wander customer.SetState(new CustomerWander(customer)); } } }
public override void OnInteract(InteractionZone other) { base.OnInteract(other); if (other.gameObject == interactionZone) { Debug.Log("Stocking shelf after collision"); DestinationReached(); } }
public override void OnInteract(InteractionZone other) { base.OnInteract(other); // // TODO: other.gameObject == bad // // When contacting the destination exit, destroy the customer if (other.gameObject == exitZone) { customer.Destroy(); } }
public override void OnInteract(InteractionZone other) { base.OnInteract(other); if (other.gameObject == interactionZone) { DestinationReached(); } }
public void OnInteract(InteractionZone other) { state.OnInteract(other); }
public virtual void OnInteract(InteractionZone other) { }