Resettable percent
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
227e7a7eac
Commit
9086e100da
@ -42,7 +42,16 @@ public class WinconditionPercentSystem extends Wincondition implements Listener,
|
||||
teamMap.put(Fight.getBlueTeam(), new TeamPercent(Fight.getBlueTeam()));
|
||||
teamMap.put(Fight.getRedTeam(), new TeamPercent(Fight.getRedTeam()));
|
||||
|
||||
new StateDependentListener(Winconditions.PERCENT_SYSTEM, FightState.Running, this);
|
||||
new StateDependentListener(Winconditions.PERCENT_SYSTEM, FightState.Running, this){
|
||||
@Override
|
||||
public void enable() {
|
||||
super.enable();
|
||||
teamMap.forEach((team, percent) -> {
|
||||
percent.destroyedBlocks = 0;
|
||||
percent.percent = 0;
|
||||
});
|
||||
}
|
||||
};
|
||||
if(Config.ActiveWinconditions.contains(Winconditions.PERCENT_SYSTEM)){
|
||||
printableWinconditions.add(this);
|
||||
percentWincondition = this;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren