Class LootBoxOverlayComponent

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Renderable, Comparable<Renderable>

public class LootBoxOverlayComponent extends UIComponent
LootBoxOverlayComponent is responsible for displaying a UI overlay that shows items received from a loot box on the player's screen. It manages the creation, display, and disposal of the overlay window containing the loot items.
  • Constructor Details

    • LootBoxOverlayComponent

      public LootBoxOverlayComponent()
  • Method Details

    • create

      public void create()
      Initializes the loot box overlay component. Creates the overlay window and sets up the event listener to display the loot when triggered. The overlay is initially hidden.
      Overrides:
      create in class UIComponent
    • dispose

      public void dispose()
      Disposes of the loot box overlay component by hiding the overlay and removing it from the stage.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent
    • draw

      protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Draws the loot box overlay using the provided SpriteBatch. The actual rendering is handled by the stage.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - The SpriteBatch used for drawing.