public class StatGaugeUpdater extends GaugeUpdater
GaugeUpdater
which monitors a stat value.Modifier and Type | Field and Description |
---|---|
private boolean |
active
Whether the low food event should be generated.
|
private ItemSet |
itemSet
The
ItemSet instance to watch. |
private ItemSetListener |
itemSetListener
The listener to detect a changed player name.
|
private static int |
LOWFOOD_LIMIT
The LOWFOOD indicator is turned on if the FOOD value falls below this
value.
|
private int |
stat
The stat value to monitor.
|
private Stats |
stats
The
Stats instance to watch. |
private StatsListener |
statsListener
The
StatsListener registered to be notified about stat changes. |
Constructor and Description |
---|
StatGaugeUpdater(ExperienceTable experienceTable,
int stat,
Stats stats,
ItemSet itemSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Frees allocated resources.
|
private void |
updateExperienceNextLevel()
Updates information for
Stats.C_STAT_EXP_NEXT_LEVEL . |
getExperienceToNextLevel, getPercentsToNextLevel, setGauge, setValues, setValues
private boolean active
@NotNull private final ItemSetListener itemSetListener
private static final int LOWFOOD_LIMIT
private final int stat
@NotNull private final StatsListener statsListener
StatsListener
registered to be notified about stat changes.public StatGaugeUpdater(@NotNull ExperienceTable experienceTable, int stat, @NotNull Stats stats, @NotNull ItemSet itemSet)
experienceTable
- the experience table to querystat
- the stat value to monitorstats
- the instance to watchitemSet
- the item set to watchpublic void dispose()
dispose
in class GaugeUpdater
private void updateExperienceNextLevel()
Stats.C_STAT_EXP_NEXT_LEVEL
.