Class ObstacleFactory
java.lang.Object
com.csse3200.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 cloud entity.static Entity
Creates a seaweed entity.static Entity
Creates a starfish entity.static Entity
Creates a tree entity.static Entity
createVisibleWall
(float width, float height) Create a visible physics wall.static Entity
createWall
(float width, float height) Creates an invisible physics wall.
-
Method Details
-
createTree
Creates a tree entity.- Returns:
- entity
-
createCloud
Creates a cloud entity.- Returns:
- entity
-
createSeaweed
Creates a seaweed entity.- Returns:
- entity
-
createStarfish
Creates a starfish entity.- Returns:
- 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
-
createVisibleWall
Create a visible physics wall.- Parameters:
width
- Wall width in world unitsheight
- Wall height in world units- Returns:
- Wall entity of given width and height
-