Package com.mygdx.auber.entities
Class KeySystem
- java.lang.Object
-
- com.mygdx.auber.entities.KeySystem
-
public class KeySystem extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description KeySystem(com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell newCell, java.lang.String newName, com.badlogic.gdx.math.Vector2 newPosition)Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.badlogic.gdx.math.Vector2getPosition()Gets the position of this KeySystem.booleanisBeingDestroyed()booleanisDestroyed()booleanisSafe()voidstartDestroy()Called when a system begins to be destroyed.voidstopDestroy()Called when an Infiltrator stops destroying a system.java.lang.LongtimeRemaining()Calculates time remaining for the system to be destroyed.
-
-
-
Constructor Detail
-
KeySystem
public KeySystem(com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell newCell, java.lang.String newName, com.badlogic.gdx.math.Vector2 newPosition)Class constructor.- Parameters:
newCell- The cell this system is located on.newName- The name of this system.newPosition- The position of this system.
-
-
Method Detail
-
startDestroy
public void startDestroy()
Called when a system begins to be destroyed.
-
stopDestroy
public void stopDestroy()
Called when an Infiltrator stops destroying a system.
-
timeRemaining
public java.lang.Long timeRemaining()
Calculates time remaining for the system to be destroyed. Note: System is destroyed in 60 seconds.- Returns:
- Null if system isn't being/hasn't been destroyed. Otherwise, time remaining in milliseconds.
-
isSafe
public boolean isSafe()
- Returns:
- True if the system has not been destroyed and is not currently being destroyed. False otherwise.
-
isBeingDestroyed
public boolean isBeingDestroyed()
- Returns:
- True if the system is currently being destroyed, but has not been destroyed yet. False otherwise.
-
isDestroyed
public boolean isDestroyed()
- Returns:
- True if the system has been destroyed, false otherwise
-
getPosition
public com.badlogic.gdx.math.Vector2 getPosition()
Gets the position of this KeySystem.- Returns:
- A Vector2 containing this KeySystem's position.
-
-