Class SecurityCameraFactory
java.lang.Object
com.csse3200.game.entities.factories.SecurityCameraFactory
The security camera factory is used to spawn in new security camera entities. It consists of
static methods that initialise the various components based off of set default values.
This can ensure that all cameras stay uniform throughout the game.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createSecurityCamera
(Entity target, float angularVel, float rotation, String id) Creates a new rotated security camera entity.static Entity
createSecurityCamera
(Entity target, float angularVel, String id) Creates a new security camera entity.static Entity
createStaticSecurityCam
(Entity target, float dist, float dir, float rotation, String id) Creates a new static security camera entity.
-
Constructor Details
-
SecurityCameraFactory
public SecurityCameraFactory()
-
-
Method Details
-
createSecurityCamera
Creates a new security camera entity. The id string can be looked up using the SecurityCamRetrievalService which will return this created entity.- Parameters:
target
- The target entity to be detected by the cameraangularVel
- The angular velocity at which the camera rotates atid
- The id of the camera which will be registered with the retrieval service- Returns:
- The newly created security camera entity
-
createSecurityCamera
public static Entity createSecurityCamera(Entity target, float angularVel, float rotation, String id) Creates a new rotated security camera entity. The id string can be looked up using the SecurityCamRetrievalService which will return this created entity.- Parameters:
target
- The target entity to be detected by the cameraangularVel
- The angular velocity at which the camera rotates atrotation
- The rotational angle at which to place the camera atid
- The id of the camera which will be registered with the retrieval service- Returns:
- The newly created security camera entity
-
createStaticSecurityCam
public static Entity createStaticSecurityCam(Entity target, float dist, float dir, float rotation, String id) Creates a new static security camera entity. The id string can be looked up using the SecurityCamRetrievalService which will return this created entity.- Parameters:
target
- The target entity to be detected by the cameradist
- The distance of the light rays from the cameradir
- The direction which the camera will face inrotation
- The rotational angle at which to place the camera atid
- The id of the camera which will be registered with the retrieval service- Returns:
- The newly created security camera entit
-