Java Code Examples for com.watabou.input.Touchscreen#processTouchEvents()
The following examples show how to use
com.watabou.input.Touchscreen#processTouchEvents() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Game.java From remixed-dungeon with GNU General Public License v3.0 | 6 votes |
@SneakyThrows private void step() { if (requestedReset) { requestedReset = false; switchScene(sceneClass.newInstance()); return; } Game.elapsed = Game.timeScale * step * 0.001f; synchronized (motionEvents) { Touchscreen.processTouchEvents(motionEvents); motionEvents.clear(); } synchronized (keysEvents) { Keys.processTouchEvents(keysEvents); keysEvents.clear(); } scene.update(); Camera.updateAll(); }
Example 2
Source File: Game.java From YetAnotherPixelDungeon with GNU General Public License v3.0 | 5 votes |
protected void update() { Game.elapsed = Game.timeScale * step * 0.001f; synchronized (motionEvents) { Touchscreen.processTouchEvents( motionEvents ); motionEvents.clear(); } synchronized (keysEvents) { Keys.processTouchEvents( keysEvents ); keysEvents.clear(); } scene.update(); Camera.updateAll(); }
Example 3
Source File: Game.java From PD-classes with GNU General Public License v3.0 | 5 votes |
protected void update() { Game.elapsed = Game.timeScale * step * 0.001f; synchronized (motionEvents) { Touchscreen.processTouchEvents( motionEvents ); motionEvents.clear(); } synchronized (keysEvents) { Keys.processTouchEvents( keysEvents ); keysEvents.clear(); } scene.update(); Camera.updateAll(); }