Class AchievementPopup

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

public class AchievementPopup extends UIComponent
AchievementPopup is an UIComponent that displays whenever the player completes a new achievement and then disappears.
  • Constructor Details

    • AchievementPopup

      public AchievementPopup()
  • Method Details

    • create

      public void create()
      Adds the listener for triggering the popup.
      Overrides:
      create in class UIComponent
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Handles drawing of the component. The actual rendering is managed by the stage.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - The SpriteBatch used for drawing.
    • generate

      public void generate(Achievement achievement)
      Creates and animates the popup, adds it to the stage.
      Parameters:
      achievement - the achievement being completed.
    • dispose

      public void dispose()
      Disposes of popup message.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class RenderComponent