use of org.eclipse.collections.api.block.procedure.primitive.FloatProcedure in project narchy by automenta.
the class SpaceKeys method accept.
@Override
public void accept(JoglWindow j) {
RoaringBitmap queue = this.queue;
if (!queue.isEmpty()) {
float dt = j.dtMS() / 1000f;
synchronized (on) {
this.queue = new RoaringBitmap();
}
queue.forEach((int k) -> {
// shouldnt ever be zero actually
boolean s = k >= 0;
FloatProcedure f = ((s) ? keyPressed : keyReleased).get(Math.abs(k));
if (f != null)
f.value(dt);
});
}
}
Aggregations