Class BoxFactory
java.lang.Object
com.csse3200.game.entities.factories.BoxFactory
Factory class for creating box entities in the game.
Types of boxes that can be created include:
- white static (immovable)
- blue movable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder that creates autonomous (kinematic) box entities that can be used as moving game obstacles. -
Method Summary
-
Method Details
-
createStaticBox
Creates a static (immovable) box entity.The box currently displays as a white square, scaled to half a game unit.
Its static body type makes it immovable. Other physical game objects can collide with it, but it does not move, react to collisions and cannot be destroyed.
- Returns:
- A new static box Entity
-
createMoveableBox
Creates a dynamic (moveable) box entity.The box currently displays as a blue square, scaled to half a game unit.
Its dynamic body type makes it moveable. The player can automatically push the box with its body, or interact with the box to lift it or drop it. The player can move with the box whilst it is lifted.
- Returns:
- A new moveable box Entity
-