mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Reset wired game stats on initialization
This commit is contained in:
parent
732910e3fc
commit
1c387eff51
@ -80,6 +80,14 @@ public class GameTeam {
|
|||||||
this.members.clear();
|
this.members.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resetScores() {
|
||||||
|
for (GamePlayer player : this.members) {
|
||||||
|
if (player == null) continue;
|
||||||
|
|
||||||
|
player.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public THashSet<GamePlayer> getMembers() {
|
public THashSet<GamePlayer> getMembers() {
|
||||||
return this.members;
|
return this.members;
|
||||||
|
@ -15,6 +15,10 @@ public class WiredGame extends Game {
|
|||||||
@Override
|
@Override
|
||||||
public void initialise() {
|
public void initialise() {
|
||||||
this.state = GameState.RUNNING;
|
this.state = GameState.RUNNING;
|
||||||
|
|
||||||
|
for (GameTeam team : this.teams.values()) {
|
||||||
|
team.resetScores();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user