Class SecurityCamRetrievalService

java.lang.Object
com.csse3200.game.lighting.SecurityCamRetrievalService
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class SecurityCamRetrievalService extends Object implements com.badlogic.gdx.utils.Disposable
A service to hold a map of the key-item pairs (id string, security camera entity) allowing for global access. This is useful when registering a new enemy with the corresponding camera
  • Constructor Details

    • SecurityCamRetrievalService

      public SecurityCamRetrievalService()
  • Method Details

    • registerCamera

      public void registerCamera(String id, Entity entity)
      Register a security camera entity with the service.
      Parameters:
      id - The id of the security camera
      entity - The parent entity of the security camera
    • getSecurityCam

      public Entity getSecurityCam(String id)
      Retrieve the corresponding security camera based upon its id.
      Parameters:
      id - The id of the security camera
      Returns:
      The parent entity of the security camera
    • getDetectorComp

      public ConeDetectorComponent getDetectorComp(String id)
      Returns the cone detector component of the security camera
      Parameters:
      id - The id of the security camera
      Returns:
      The cone detector component from the security camera
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable