Class ObstacleFactory

java.lang.Object
com.csse3200.game.entities.factories.ObstacleFactory

public class ObstacleFactory extends Object
Factory to create obstacle entities.

Each obstacle entity type should have a creation method that returns a corresponding entity.

  • Method Details

    • createTree

      public static Entity createTree()
      Creates a tree entity.
      Returns:
      entity
    • createCloud

      public static Entity createCloud()
      Creates a cloud entity.
      Returns:
      entity
    • createSeaweed

      public static Entity createSeaweed()
      Creates a seaweed entity.
      Returns:
      entity
    • createStarfish

      public static Entity createStarfish()
      Creates a starfish entity.
      Returns:
      entity
    • createWall

      public static Entity createWall(float width, float height)
      Creates an invisible physics wall.
      Parameters:
      width - Wall width in world units
      height - Wall height in world units
      Returns:
      Wall entity of given width and height
    • createVisibleWall

      public static Entity createVisibleWall(float width, float height)
      Create a visible physics wall.
      Parameters:
      width - Wall width in world units
      height - Wall height in world units
      Returns:
      Wall entity of given width and height