fix: add new event properties to builder
This commit is contained in:
parent
56a90f6bdf
commit
a9c80cb19b
@ -41,7 +41,9 @@ public class EventBuilder {
|
||||
// Keys used primarily in GameStateEvents
|
||||
private Entity[] entities;
|
||||
private EntityID[] turnOrder;
|
||||
private IntVector2 mapSize;
|
||||
private EntityID activeCharacter;
|
||||
private Integer[] stoneCooldowns;
|
||||
private Boolean winCondition;
|
||||
|
||||
// Keys used in CustomEvents
|
||||
@ -145,11 +147,21 @@ public class EventBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventBuilder withMapSize(IntVector2 mapSize) {
|
||||
this.mapSize = mapSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventBuilder withActiveCharacter(EntityID activeCharacter) {
|
||||
this.activeCharacter = activeCharacter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventBuilder withStoneCooldowns(Integer[] stoneCooldowns) {
|
||||
this.stoneCooldowns = stoneCooldowns;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EventBuilder withWinCondition(Boolean winCondition) {
|
||||
this.winCondition = winCondition;
|
||||
return this;
|
||||
|
@ -11,9 +11,9 @@ import java.util.Objects;
|
||||
public class GameStateEvent extends Event {
|
||||
public Entity[] entities;
|
||||
public EntityID[] turnOrder;
|
||||
public IntVector2 mapSize; // Stores the map size, for example for a 10x15 map [9,14] (starting from 0)
|
||||
public IntVector2 mapSize;
|
||||
public EntityID activeCharacter;
|
||||
public Integer[] stoneCooldowns; // Int[6]
|
||||
public Integer[] stoneCooldowns;
|
||||
public Boolean winCondition;
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user