Class ObstacleFactory

java.lang.Object
com.deco2800.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
    • createSmallTree

      public static Entity createSmallTree()
      Creates a small tree entity. - Team 5 1map4all @LYB
      Returns:
      small tree entity
    • createCraftingTableForest

      public static Entity createCraftingTableForest()
      Creates the crafting table entity for the forest map
      Returns:
      crafting table entity
    • createCraftingTableUnderground

      public static Entity createCraftingTableUnderground()
      Creates the crafting table entity for the underground map
      Returns:
      crafting table 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
    • drawWall

      public static Entity drawWall(float width, float height)
      Creates a visible physics wall. Use for measure the entities' range on the map.(Like ruler)
      Parameters:
      width - Wall width in world units
      height - Wall height in world units
      Returns:
      Wall entity of given width and height
    • createColumn

      public static Entity createColumn()
      Creates a column entity on the map. - Team 5 1map4all @LYB
      Returns:
      Column entity.
    • drawColumnsCollision

      public static Entity drawColumnsCollision(float width)
      Creates multiple columns entity on the map. - Team 5 1map4all @LYB
      Returns:
      Column entity.
    • createRock

      public static Entity createRock()
      Creates a rock entity on the map. - Team 5 1map4all @LYB
      Returns:
      Column entity.