Esempio n. 1
0
 public void reset() {
   for (ObjectiveTracker o : subObjectives) {
     o.reset();
   }
   selected = null;
   accomplished = false;
 }
Esempio n. 2
0
 public void reset() {
   for (ObjectiveTracker o : subObjectives) {
     o.reset();
   }
   current = 0;
   accomplished = false;
 }
Esempio n. 3
0
      public boolean check() {
        boolean hit = false;
        if (selected == null) {
          for (ObjectiveTracker o : subObjectives) {
            hit = o.check();
            if (hit) {
              selected = o;
              break;
            }
          }

          if (hit) {
            for (ObjectiveTracker o : subObjectives) {
              if (o != selected) {
                o.unhighlight();
              }
            }
          }
        } else {
          hit = selected.check();
        }

        if (selected != null) {
          accomplished = selected.isAccomplished();
          if (accomplished) {
            selected.unhighlight();
          }
        }
        return hit;
      }
Esempio n. 4
0
 public void unhighlight() {
   for (ObjectiveTracker o : subObjectives) {
     o.unhighlight();
   }
 }
Esempio n. 5
0
 public boolean isTerminal() {
   return (super.isTerminal() || objectiveTracker.isAccomplished());
 }
Esempio n. 6
0
 public void update() {
   super.update();
   subgoalAchieved = objectiveTracker.check();
 }
Esempio n. 7
0
 @Override
 public void reset() {
   super.reset();
   objectiveTracker.reset();
   objectiveTracker.highlight();
 }