use of me.wobblyyyy.pathfinder2.utils.Toggle in project Pathfinder2 by Wobblyyyy.
the class ExampleListeners method exampleToggleListeners.
public void exampleToggleListeners() {
Pathfinder pathfinder = Pathfinder.newSimulatedPathfinder(0.01);
Toggle toggle = new Toggle();
// bind the A button to toggling the toggle
pathfinder.getListenerManager().bind(ListenerMode.CONDITION_NEWLY_MET, this::aButton, b -> b, b -> toggle.toggle());
while (true) {
pathfinder.tick();
}
}
Aggregations