Class 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.Vector2 getPosition()
      Gets the position of this KeySystem.
      boolean isBeingDestroyed()  
      boolean isDestroyed()  
      boolean isSafe()  
      void startDestroy()
      Called when a system begins to be destroyed.
      void stopDestroy()
      Called when an Infiltrator stops destroying a system.
      java.lang.Long timeRemaining()
      Calculates time remaining for the system to be destroyed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.