Class SecurityCameraFactory

java.lang.Object
com.csse3200.game.entities.factories.SecurityCameraFactory

public class SecurityCameraFactory extends Object
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 Details

    • SecurityCameraFactory

      public SecurityCameraFactory()
  • Method Details

    • createSecurityCamera

      public static Entity createSecurityCamera(Entity target, float angularVel, String id)
      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 camera
      angularVel - The angular velocity at which the camera rotates at
      id - 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 camera
      angularVel - The angular velocity at which the camera rotates at
      rotation - The rotational angle at which to place the camera at
      id - 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 camera
      dist - The distance of the light rays from the camera
      dir - The direction which the camera will face in
      rotation - The rotational angle at which to place the camera at
      id - The id of the camera which will be registered with the retrieval service
      Returns:
      The newly created security camera entit