Class Bench

java.lang.Object
com.csse3200.game.entities.Entity
com.csse3200.game.entities.benches.Bench

public class Bench extends Entity
This class is responsible for creating benches in the game. Benches are static entities that can be interacted with by the player. This initialiser handles applying the texture, scaling and collisions of the bench.
  • Field Details

    • type

      public String type
    • x

      public int x
    • y

      public int y
  • Constructor Details

    • Bench

      public Bench(String type, int x, int y)
      initialiser creates a bench of a certain type at a location
      Parameters:
      type - - file name of bench image
      x - - x coordinate
      y - - y coordinate
  • Method Details

    • createBench

      public static Entity createBench(String type)
      Creates visible bench.
      Parameters:
      type - Type of bench
      Returns:
      Station entity of given width and height with relevant behaviors
    • getX

      public int getX()
    • getY

      public int getY()