Class GeneratorStatsComponent


public class GeneratorStatsComponent extends CombatStatsComponent
  • Constructor Details

    • GeneratorStatsComponent

      public GeneratorStatsComponent(int health, int interval, int scrapValue)
      Creates a new GeneratorStatsComponent with the given stats
      Parameters:
      health - the maximum health of the generator
      interval - the currency generation rate
      scrapValue - the value of the scrap generated
  • Method Details

    • getInterval

      public int getInterval()
      Returns the current interval value.
      Returns:
      the interval
    • setInterval

      public void setInterval(int interval)
      Sets the interval value. If the provided value is negative, the interval is set to 0
      Parameters:
      interval - new interval
    • getScrapValue

      public int getScrapValue()
      Returns the current scrap value.
      Returns:
      the scrap value
    • setScrapValue

      public void setScrapValue(int scrapValue)
      Sets the scrap value. if the provided value is negative, the scrap value is set to 0
      Parameters:
      scrapValue - new scrap value