示例#1
0
      @Override
      public boolean doMission(LittleMan actor) {

        if (actMission == missionList.length) {
          actor.setCarryObject(null);
          if (workrounds == 0) {
            if (!mill.isActive()) {
              mill.setActive(true);
            } else {
              return false;
            }
          }
          if (workrounds < 60) {
            workrounds++;
            actMission--;
            return false;
          } else {
            mill.setActive(false);
            actor.setCarryObject(new Flour());
            home.missionCompleted(this);
            return true;
          }

        } else {
          if (missionList[actMission].doMission(actor)) {
            actMission++;
            return false;
          }
          return false;
        }
      }
示例#2
0
 Millwork(Mill mill) {
   super(mill);
   this.mill = mill;
   missionList = new Mission[1];
   missionList[0] = new Mission_GoTo(mill.getWorkPos());
 }