Class RageUpgrade

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

public class RageUpgrade extends UIComponent implements Upgrade
Manages the Rage Upgrade UI component, handling activation, deactivation, visual updates, and related sound effects. When in rage mode, stations operate twice as fast
  • Field Details

    • layout

      public com.badlogic.gdx.scenes.scene2d.ui.Table layout
    • rageMeter

      public com.badlogic.gdx.scenes.scene2d.ui.ProgressBar rageMeter
  • Constructor Details

    • RageUpgrade

      public RageUpgrade()
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class UIComponent
    • activate

      public void activate()
      Description copied from interface: Upgrade
      Activate the upgrade, this will be called once the random upgrade is generated
      Specified by:
      activate in interface Upgrade
    • activateRageMode

      public void activateRageMode()
      Activates Rage mode by triggering the event, playing activation sound, displaying the overlay, and initializing the rage timer.
    • deactivate

      public void deactivate()
      Description copied from interface: Upgrade
      Deactivate the activated upgrade once it reaches time limit
      Specified by:
      deactivate in interface Upgrade
    • deactivateRageMode

      public void deactivateRageMode()
      Deactivates Rage mode by triggering related events, playing power down sound, hiding the overlay, and initiating the rage meter refill process.
    • update

      public void update()
      Updates the RageUpgrade component each frame, managing the rage timer and the refill process based on the current state.
      Overrides:
      update in class Component
    • draw

      protected void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)
      Description copied from class: RenderComponent
      Draw the renderable. Should be called only by the renderer, not manually.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • setStage

      public void setStage(com.badlogic.gdx.scenes.scene2d.Stage mock)
      Specified by:
      setStage in interface Renderable
    • isOverlayVisible

      public boolean isOverlayVisible()
    • isRageFilling

      public boolean isRageFilling()
    • isRageActive

      public boolean isRageActive()
    • getRageFillTime

      public float getRageFillTime()
    • getRageFillTimeRemaining

      public float getRageFillTimeRemaining()