Class ObstacleFactory
java.lang.Object
com.deco2800.game.entities.factories.ObstacleFactory
Factory to create obstacle entities.
Each obstacle entity type should have a creation method that returns a corresponding entity.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
Creates a column entity on the map.static Entity
Creates the crafting table entity for the forest mapstatic Entity
Creates the crafting table entity for the underground mapstatic Entity
Creates a rock entity on the map.static Entity
Creates a small tree entity.static Entity
Creates a tree entity.static Entity
createWall
(float width, float height) Creates an invisible physics wall.static Entity
drawColumnsCollision
(float width) Creates multiple columns entity on the map.static Entity
drawWall
(float width, float height) Creates a visible physics wall.
-
Method Details
-
createTree
Creates a tree entity.- Returns:
- entity
-
createSmallTree
Creates a small tree entity. - Team 5 1map4all @LYB- Returns:
- small tree entity
-
createCraftingTableForest
Creates the crafting table entity for the forest map- Returns:
- crafting table entity
-
createCraftingTableUnderground
Creates the crafting table entity for the underground map- Returns:
- crafting table entity
-
createWall
Creates an invisible physics wall.- Parameters:
width
- Wall width in world unitsheight
- Wall height in world units- Returns:
- Wall entity of given width and height
-
drawWall
Creates a visible physics wall. Use for measure the entities' range on the map.(Like ruler)- Parameters:
width
- Wall width in world unitsheight
- Wall height in world units- Returns:
- Wall entity of given width and height
-
createColumn
Creates a column entity on the map. - Team 5 1map4all @LYB- Returns:
- Column entity.
-
drawColumnsCollision
Creates multiple columns entity on the map. - Team 5 1map4all @LYB- Returns:
- Column entity.
-
createRock
Creates a rock entity on the map. - Team 5 1map4all @LYB- Returns:
- Column entity.
-