obj.beginStep(delta);
}
synchronized (this) {
while (!inputEvents.isEmpty()) {
InputEvent ev = inputEvents.poll();
if (ev instanceof KeyEvent) {
if (ev.getID() == KeyEvent.KEY_PRESSED) {
if (((KeyEvent) ev).getKeyCode() == KeyEvent.VK_BACK_QUOTE
&& !GMObject.keys[KeyEvent.VK_BACK_QUOTE])
GMObject.DEBUG = !GMObject.DEBUG;
GMObject.keys[((KeyEvent) ev).getKeyCode()] = true;
for (GMObject obj : objects)
if (!obj.isDeactivated()
&& (pause == 0 || (obj.pausable & pause) != 0))
obj.keyPressed((KeyEvent) ev);
} else if (ev.getID() == KeyEvent.KEY_RELEASED) {
GMObject.keys[((KeyEvent) ev).getKeyCode()] = false;
for (GMObject obj : objects)
if (!obj.isDeactivated()
&& (pause == 0 || (obj.pausable & pause) != 0))
obj.keyReleased((KeyEvent) ev);
}
} else if (ev instanceof MouseWheelEvent) {
for (GMObject obj : objects)
if (!obj.isDeactivated()
&& (pause == 0 || (obj.pausable & pause) != 0))
obj.mouseWheel((MouseWheelEvent) ev);
} else if (ev instanceof MouseEvent) {
if (ev.getID() == MouseEvent.MOUSE_PRESSED) {
for (GMObject obj : objects)
if (!obj.isDeactivated()
&& (pause == 0 || (obj.pausable & pause) != 0))
obj.mousePressed((MouseEvent) ev);
} else if (ev.getID() == MouseEvent.MOUSE_RELEASED) {
for (GMObject obj : objects)
if (!obj.isDeactivated()
&& (pause == 0 || (obj.pausable & pause) != 0))
obj.mouseReleased((MouseEvent) ev);
}