Interface Upgrade

All Known Subinterfaces:
ItemSpawner

public interface Upgrade
  • Method Details

    • getName

      String getName()
      Returns:
      registered name of this upgrade
    • getInstanceName

      String getInstanceName()
      Returns:
      identificator of this upgrade instance
    • getLevel

      double getLevel()
      Returns:
      current level of upgrade
    • setLevel

      void setLevel(double level)
      Sets level of this upgrade
      Parameters:
      level - Current level
    • increaseLevel

      void increaseLevel(double level)
      Add levels to this upgrade
      Parameters:
      level - Levels that will be added to current level
    • getInitialLevel

      double getInitialLevel()
      Returns:
      initial level of upgrade
    • onUpgradeRegistered

      default void onUpgradeRegistered(Game game)
      Called when upgrade is registered
      Parameters:
      game - Game when upgrade is activated
    • onUpgradeUnregistered

      default void onUpgradeUnregistered(Game game)
      Called when upgrade is unregistered
      Parameters:
      game - Game when upgrade is deactivated