Package io.github.team6ENG.EscapeUni
Class BuildingManager
java.lang.Object
io.github.team6ENG.EscapeUni.BuildingManager
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
ConstructorsConstructorDescriptionBuildingManager(Main game, GameScreen gameScreen, Player player, AudioManager audioManager) Constructs a BuildingManager with a reference to the player. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes building-related assets.booleanReturns whether the player is currently inside Langwith.booleanReturns whether the player is currently inside the Ron Cooke building.voidrender(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, com.badlogic.gdx.graphics.g2d.BitmapFont font, float worldWidth, float worldHeight) Renders the building-related visuals.voidrenderBuildingMap(com.badlogic.gdx.graphics.OrthographicCamera camera) Renders the building map (placeholder for future map logic).voidrenderUI(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.voidupdate(float delta) Updates building logic each frame.
-
Constructor Details
-
BuildingManager
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.
-