Interface Upgrade
- All Known Subinterfaces:
ItemSpawner<E,
I, T>
public interface Upgrade
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
getLevel()
getName()
void
increaseLevel
(double level) Add levels to this upgradedefault void
onUpgradeRegistered
(Game game) Called when upgrade is registereddefault void
onUpgradeUnregistered
(Game game) Called when upgrade is unregisteredvoid
setLevel
(double level) Sets level of this 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
Called when upgrade is registered- Parameters:
game
- Game when upgrade is activated
-
onUpgradeUnregistered
Called when upgrade is unregistered- Parameters:
game
- Game when upgrade is deactivated
-