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 EntitycreateDoor(String keyId, GameArea area, String targetArea, boolean isStatic) Creates a door Entity with key identifierstatic EntitycreateWall(float width, float height) Creates an invisible physics wall.
-
Method Details
-
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
-
createDoor
Creates a door Entity with key identifier- Parameters:
keyId- the unique key identifier that can unlock this door- Returns:
- a new door entity bound to
keyId, in the locked state
-