Package com.csse3200.game.services
Class CustomerMovementService
java.lang.Object
com.csse3200.game.services.CustomerMovementService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.math.Vector2
getMovementTarget
(int customerId) Gets the current target position for a customer.void
registerMovement
(int customerId, com.badlogic.gdx.math.Vector2 targetPos) Registers a new customer movement with their target position.void
removeMovement
(int customerId) Removes the movement registration for a customer.void
updateMovement
(int customerId, com.badlogic.gdx.math.Vector2 targetPos) Updates the movement target position for a customer.
-
Constructor Details
-
CustomerMovementService
public CustomerMovementService()
-
-
Method Details
-
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 customertargetPos
- 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 customertargetPos
- 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
-