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 distance
    static void setPreDistance​(double pre)
    Set the pre distance, which is the distance between the tunnel and the left hand side screen.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DistanceService

      public DistanceService​(Entity player)
      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.