March 9, 20169 yr This may sound stupid but how do I use this?Apparently I have to make a "Condition" but I don't really get it, can anyone explain?
March 9, 20169 yr This may sound stupid but how do I use this? Apparently I have to make a "Condition" but I don't really get it, can anyone explain? Example: public static void webWalkEvent(final INodeRouteFinder routeFinder, final Position position, final int treshold, final MethodProvider script) { WebWalkEvent event = new WebWalkEvent(routeFinder, position); event.setBreakCondition(new Condition() { @Override public boolean evaluate() { // Return when you want the event to break. return script.getMap().distance(position) <= treshold; } }); script.execute(event); }
March 9, 20169 yr Author Example: public static void webWalkEvent(final INodeRouteFinder routeFinder, final Position position, final int treshold, final MethodProvider script) { WebWalkEvent event = new WebWalkEvent(routeFinder, position); event.setBreakCondition(new Condition() { @Override public boolean evaluate() { // Return when you want the event to break. return script.getMap().distance(position) <= treshold; } }); script.execute(event); } Thanks a lot!
Create an account or sign in to comment