public class GoalSelector extends Object
Modifier and Type | Field and Description |
---|---|
private static WeightedGoal |
activeGoal |
private EnumSet<Goal.Control> |
disabledControls |
private Set<WeightedGoal> |
goals |
private Map<Goal.Control,WeightedGoal> |
goalsByControl |
private static Logger |
LOGGER |
private Supplier<Profiler> |
profiler |
private int |
timeInterval |
Constructor and Description |
---|
GoalSelector(Supplier<Profiler> supplier) |
Modifier and Type | Method and Description |
---|---|
void |
add(int weight,
Goal goal) |
void |
disableControl(Goal.Control control) |
void |
enableControl(Goal.Control control) |
Stream<WeightedGoal> |
getRunningGoals() |
void |
remove(Goal goal) |
void |
setControlEnabled(Goal.Control control,
boolean enabled) |
void |
tick() |
private static final Logger LOGGER
private static final WeightedGoal activeGoal
private final Map<Goal.Control,WeightedGoal> goalsByControl
private final Set<WeightedGoal> goals
private final EnumSet<Goal.Control> disabledControls
private int timeInterval
public void add(int weight, Goal goal)
public void remove(Goal goal)
public void tick()
public Stream<WeightedGoal> getRunningGoals()
public void disableControl(Goal.Control control)
public void enableControl(Goal.Control control)
public void setControlEnabled(Goal.Control control, boolean enabled)