Class TextureController

java.lang.Object
tech.underoaks.coldcase.game.TextureController

public class TextureController extends Object
This class is responsible for providing the textures for the game elements.

It provides the textures for the tiles, the player, the items, the walls, etc. The textures are loaded from the assets folder. The textures are loaded only once and are stored in memory. The textures are accessed through the methods provided by this class.

The textures are loaded using the TextureFactory class.

  • Method Details

    • create

      public static TextureController create(TextureFactory factory)
      Creates a new singleton instance of this controller.
      Parameters:
      factory - TextureFactory that will be creating the Texture objects.
      Returns:
      The singleton
    • destroy

      public static void destroy()
      Destroys the current singleton instance
      See Also:
    • getInstance

      public static TextureController getInstance()
      Singleton-Caller for this Controller
      Returns:
      TextureController instance.
      Throws:
      IllegalStateException - if the TextureController has not been initialized yet.
      See Also:
    • exists

      public static boolean exists()
      Checks if a singleton of this class already exists
      Returns:
      True if it exists; False otherwise
      See Also:
    • setIsDetective

      public static void setIsDetective(boolean isDetective)
      Sets whether this TextureController is configured to return detective or ghost textures
      Parameters:
      isDetective - True if detective; False if ghost
    • getIsDetective

      public static boolean getIsDetective()
      Whether this TextureController is configured to return detective or ghost textures
      Returns:
      True if detective; False if ghost
    • getEmptyTileTexture

      public com.badlogic.gdx.graphics.Texture getEmptyTileTexture()
      Texture-Getter
      Returns:
      EmptyTileTexture
    • getGroundTileTexture

      public com.badlogic.gdx.graphics.Texture getGroundTileTexture()
      Texture-Getter
      Returns:
      GroundTileTexture
    • getTestItemTexture

      public com.badlogic.gdx.graphics.Texture getTestItemTexture()
      Texture-Getter
      Returns:
      TestItemTexture
    • getTestItem02Texture

      public com.badlogic.gdx.graphics.Texture getTestItem02Texture()
      Texture-Getter
      Returns:
      TestItem02Texture
    • getDoorTriggerTexture

      public com.badlogic.gdx.graphics.Texture getDoorTriggerTexture()
      Texture-Getter
      Returns:
      DoorTriggerTexture
    • getTestContentTexture

      public com.badlogic.gdx.graphics.Texture getTestContentTexture()
      Texture-Getter
      Returns:
      TestContentTexture
    • getPortalObjectTexture

      public com.badlogic.gdx.graphics.Texture getPortalObjectTexture()
      Texture-Getter
      Returns:
      PortalObjectTexture
    • getWallTexture

      public com.badlogic.gdx.graphics.Texture getWallTexture()
      Texture-Getter
      Returns:
      WallTexture
    • getMovableBlockTexture

      public com.badlogic.gdx.graphics.Texture getMovableBlockTexture()
      Texture-Getter
      Returns:
      MovableBlockTexture
    • getMovableBlockTranscendantTexture

      public com.badlogic.gdx.graphics.Texture getMovableBlockTranscendantTexture()
      Texture-Getter
      Returns:
      MovableBlockTranscendantTexture
    • getTranscendentTestBlockTexture

      public com.badlogic.gdx.graphics.Texture getTranscendentTestBlockTexture()
      Texture-Getter
      Returns:
      TranscendentTestBlockTexture
    • getGoalObjectTexture

      public com.badlogic.gdx.graphics.Texture getGoalObjectTexture()
      Texture-Getter
      Returns:
      GoalObjectTexture
    • getDoorTexture_closed

      public com.badlogic.gdx.graphics.Texture getDoorTexture_closed()
      Texture-Getter
      Returns:
      DoorTexture_closed
    • getDoorTexture_open

      public com.badlogic.gdx.graphics.Texture getDoorTexture_open()
      Texture-Getter
      Returns:
      DoorTexture_open
    • getGloveTexture

      public com.badlogic.gdx.graphics.Texture getGloveTexture()
      Texture-Getter
      Returns:
      GloveTexture
    • getPlayerTexture

      public com.badlogic.gdx.graphics.Texture getPlayerTexture()
      Texture-Getter
      Returns:
      PlayerTexture
    • getPlayerTextureNorth

      public com.badlogic.gdx.graphics.Texture getPlayerTextureNorth()
      Texture-Getter
      Returns:
      PlayerTextureNorth
    • getPlayerTextureSouth

      public com.badlogic.gdx.graphics.Texture getPlayerTextureSouth()
      Texture-Getter
      Returns:
      PlayerTextureSouth
    • getPlayerTextureEast

      public com.badlogic.gdx.graphics.Texture getPlayerTextureEast()
      Texture-Getter
      Returns:
      PlayerTextureEast
    • getPlayerTextureWest

      public com.badlogic.gdx.graphics.Texture getPlayerTextureWest()
      Texture-Getter
      Returns:
      PlayerTextureWest
    • getGhostTexture

      public com.badlogic.gdx.graphics.Texture getGhostTexture()
      Texture-Getter
      Returns:
      GhostTexture
    • getDetectiveTexture

      public com.badlogic.gdx.graphics.Texture getDetectiveTexture()
      Texture-Getter
      Returns:
      DetectiveTexture
    • getTrigger_closed

      public com.badlogic.gdx.graphics.Texture getTrigger_closed()
      Texture-Getter
      Returns:
      Trigger_closed
    • getTrigger_opened

      public com.badlogic.gdx.graphics.Texture getTrigger_opened()
      Texture-Getter
      Returns:
      Trigger_opened
    • holeTexture

      public com.badlogic.gdx.graphics.Texture holeTexture()
      Texture-Getter
      Returns:
      holeTexture