Class ExtortionUpgrade

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

public class ExtortionUpgrade extends UIComponent implements Upgrade
Manages the Extortion Upgrade component, allowing players to receive extra gold per customer
  • Field Details

    • layout

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

      public com.badlogic.gdx.scenes.scene2d.ui.Label text
    • meter

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

    • ExtortionUpgrade

      public ExtortionUpgrade()
    • ExtortionUpgrade

      public ExtortionUpgrade(CombatStatsComponent combatStatsComponent)
  • 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()
      Activates the extortion upgrade
      Specified by:
      activate in interface Upgrade
    • deactivate

      public void deactivate()
      Deactivates the extortion upgrade
      Specified by:
      deactivate in interface Upgrade
    • update

      public void update()
      checks to see if the duration of ugprade has ended and consequently deactivates
      Overrides:
      update in class Component
    • dispose

      public void dispose()
      Description copied from class: Component
      Called when the component is disposed. Dispose of any internal resources here.
      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)
      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
    • isActive

      public boolean isActive()
    • isVisible

      public boolean isVisible()
    • getUpgradeDuration

      public long getUpgradeDuration()
    • getActivateTimeRemaining

      public float getActivateTimeRemaining()
    • getPlaySound

      public boolean getPlaySound()