Class CustomerMovementService

java.lang.Object
com.csse3200.game.services.CustomerMovementService

public class CustomerMovementService extends Object
  • Constructor Details

    • CustomerMovementService

      public CustomerMovementService()
  • Method Details

    • getEvents

      public EventHandler getEvents()
    • registerMovement

      public void registerMovement(int customerId, com.badlogic.gdx.math.Vector2 targetPos)
      Registers a new customer movement with their target position.
      Parameters:
      customerId - the ID of the customer
      targetPos - the target position
    • updateMovement

      public void updateMovement(int customerId, com.badlogic.gdx.math.Vector2 targetPos)
      Updates the movement target position for a customer.
      Parameters:
      customerId - the ID of the customer
      targetPos - the new target position
    • removeMovement

      public void removeMovement(int customerId)
      Removes the movement registration for a customer.
      Parameters:
      customerId - the ID of the customer
    • getMovementTarget

      public com.badlogic.gdx.math.Vector2 getMovementTarget(int customerId)
      Gets the current target position for a customer.
      Parameters:
      customerId - the ID of the customer
      Returns:
      the target position, or null if no movement is registered for the customer