Package com.csse3200.game.lighting
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Returns the cone detector component of the security cameragetSecurityCam
(String id) Retrieve the corresponding security camera based upon its id.void
registerCamera
(String id, Entity entity) Register a security camera entity with the service.
-
Constructor Details
-
SecurityCamRetrievalService
public SecurityCamRetrievalService()
-
-
Method Details
-
registerCamera
Register a security camera entity with the service.- Parameters:
id
- The id of the security cameraentity
- The parent entity of the security camera
-
getSecurityCam
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
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 interfacecom.badlogic.gdx.utils.Disposable
-