Crossfire JXClient, Trunk
|
Public Member Functions | |
StarvingWatcher (@NotNull final Stats stats) | |
Private Member Functions | |
void | update () |
Private Attributes | |
final Stats | stats |
final StatsListener | statsListener |
final Timer | timer = new Timer(TIMEOUT_DE_ASSERT, e -> update()) |
Static Private Attributes | |
static final int | TIMEOUT_DE_ASSERT = 1000 |
Helper class to generate Stats#C_STAT_STARVING value from the Stats#CS_STAT_FOOD value.
Definition at line 33 of file StarvingWatcher.java.
com.realtime.crossfire.jxclient.stats.StarvingWatcher.StarvingWatcher | ( | @NotNull final Stats | stats | ) |
Creates a new instance.
stats | the stats instance to notify |
Definition at line 109 of file StarvingWatcher.java.
References com.realtime.crossfire.jxclient.stats.Stats.addCrossfireStatsListener(), com.realtime.crossfire.jxclient.stats.StarvingWatcher.stats, com.realtime.crossfire.jxclient.stats.StarvingWatcher.statsListener, com.realtime.crossfire.jxclient.stats.StarvingWatcher.timer, and com.realtime.crossfire.jxclient.stats.StarvingWatcher.update().
|
private |
Updates the current starving state from the current food value.
Definition at line 119 of file StarvingWatcher.java.
References com.realtime.crossfire.jxclient.stats.Stats.C_STAT_STARVING, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_FOOD, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_HP, com.realtime.crossfire.jxclient.stats.Stats.getStat(), com.realtime.crossfire.jxclient.stats.Stats.setStat(), and com.realtime.crossfire.jxclient.stats.StarvingWatcher.stats.
Referenced by com.realtime.crossfire.jxclient.stats.StarvingWatcher.StarvingWatcher().
|
private |
The stats instance to notify.
Definition at line 44 of file StarvingWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.StarvingWatcher.StarvingWatcher(), and com.realtime.crossfire.jxclient.stats.StarvingWatcher.update().
|
private |
The StatsListener registered to be notified about stat changes.
Definition at line 51 of file StarvingWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.StarvingWatcher.StarvingWatcher().
|
staticprivate |
Timeout after that the "starving" state is set or reset.
Definition at line 38 of file StarvingWatcher.java.
|
private |
The Timer for turning off the poison symbol.
Definition at line 103 of file StarvingWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.StarvingWatcher.StarvingWatcher().