Class BuildingManager

java.lang.Object
io.github.team6ENG.EscapeUni.BuildingManager

public class BuildingManager extends Object
Manages building-related interactions and rendering in the game world. Features: Detects when the player approaches the Ron Cooke building trigger zone. Allows entering/exiting the building with specific key inputs. Displays prompts and simple UI transitions.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BuildingManager(Main game, GameScreen gameScreen, Player player, AudioManager audioManager)
    Constructs a BuildingManager with a reference to the player.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disposes building-related assets.
    boolean
    Returns whether the player is currently inside Langwith.
    boolean
    Returns whether the player is currently inside the Ron Cooke building.
    void
    render(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.g2d.BitmapFont font, float worldWidth, float worldHeight)
    Renders the building-related visuals.
    void
    renderBuildingMap(com.badlogic.gdx.graphics.OrthographicCamera camera)
    Renders the building map (placeholder for future map logic).
    void
    renderUI(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.g2d.BitmapFont smallFont, com.badlogic.gdx.graphics.g2d.BitmapFont bigFont, float worldWidth, float worldHeight)
    Renders building-related UI.
    void
    update(float delta)
    Updates building logic each frame.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BuildingManager

      public BuildingManager(Main game, GameScreen gameScreen, Player player, AudioManager audioManager)
      Constructs a BuildingManager with a reference to the player.
      Parameters:
      player - The player instance used to track position and interaction.
  • Method Details

    • update

      public void update(float delta)
      Updates building logic each frame.
      Parameters:
      delta - Time elapsed since the last frame (in seconds).
    • render

      public void render(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.g2d.BitmapFont font, float worldWidth, float worldHeight)
      Renders the building-related visuals.
      Parameters:
      batch - The SpriteBatch used for drawing text and UI elements.
      font - The font used to render messages.
      worldWidth - The width of the game world (used for centering text).
      worldHeight - The height of the game world.
    • renderBuildingMap

      public void renderBuildingMap(com.badlogic.gdx.graphics.OrthographicCamera camera)
      Renders the building map (placeholder for future map logic).
      Parameters:
      camera - The game camera used for view rendering.
    • renderUI

      public void renderUI(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.g2d.BitmapFont smallFont, com.badlogic.gdx.graphics.g2d.BitmapFont bigFont, float worldWidth, float worldHeight)
      Renders building-related UI.
      Parameters:
      batch - The SpriteBatch used to render.
      smallFont - A smaller font for hints or labels.
      bigFont - A larger font for titles or messages.
      worldWidth - The game world width.
      worldHeight - The game world height.
    • dispose

      public void dispose()
      Disposes building-related assets. (Currently a placeholder since no disposable resources are loaded here.)
    • isInRonCooke

      public boolean isInRonCooke()
      Returns whether the player is currently inside the Ron Cooke building.
      Returns:
      true if the player is inside, false otherwise.
    • isInLangwith

      public boolean isInLangwith()
      Returns whether the player is currently inside Langwith.
      Returns:
      true if the player is inside, false otherwise.