Package com.deco2800.game.services
Class DistanceService
java.lang.Object
com.deco2800.game.services.DistanceService
public class DistanceService
extends java.lang.Object
DistanceService handles the distance value in the game.
-
Constructor Summary
Constructors Constructor Description DistanceService(Entity player)
Constructor of DistanceService -
Method Summary
Modifier and Type Method Description double
getDistance()
get the player's distancestatic void
setPreDistance(double pre)
Set the pre distance, which is the distance between the tunnel and the left hand side screen.
-
Constructor Details
-
DistanceService
Constructor of DistanceService- Parameters:
player
- the player entity
-
-
Method Details
-
setPreDistance
public static void setPreDistance(double pre)Set the pre distance, which is the distance between the tunnel and the left hand side screen.- Parameters:
pre
- the distance between
-
getDistance
public double getDistance()get the player's distance- Returns:
- return the player distance in the map.
-