Jump to content

[Question] WalkingEvent timeout


Recommended Posts

Posted

Is there a cleaner way than the following snippet to set the timeout of a WalkingEvent?

While we're at it, what is the default timeout for a WalkingEvent?

 

(walkingTimer is a timer class)

walkingTimer.reset();
WalkingEvent walkingEvent = new WalkingEvent(voidKnightArea);
walkingEvent.setBreakCondition(new Condition() {
	@Override
	public boolean evaluate() {
		return walkingTimer.getElapsedSeconds() > 10;
	}
});
execute(walkingEvent);

Cheerseroni

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...