コード例 #1
0
 @Override
 public boolean keyDown(int keycode) {
   for (int i = screenStack.size() - 1; i >= 0; i--) {
     GameScreen gs = screenStack.get(i);
     if (gs.processor() == null) continue;
     if (gs.processor().keyDown(keycode) || gs.blocksInput()) return true;
   }
   return false;
 }
コード例 #2
0
 @Override
 public boolean mouseMoved(int screenX, int screenY) {
   for (int i = screenStack.size() - 1; i >= 0; i--) {
     GameScreen gs = screenStack.get(i);
     if (gs.processor() == null) continue;
     if (gs.processor().mouseMoved(screenX, screenY) || gs.blocksInput()) return true;
   }
   return false;
 }
コード例 #3
0
 @Override
 public boolean scrolled(int amount) {
   for (int i = screenStack.size() - 1; i >= 0; i--) {
     GameScreen gs = screenStack.get(i);
     if (gs.processor() == null) continue;
     if (gs.processor().scrolled(amount) || gs.blocksInput()) return true;
   }
   return false;
 }
コード例 #4
0
 @Override
 public boolean touchDragged(int screenX, int screenY, int pointer) {
   for (int i = screenStack.size() - 1; i >= 0; i--) {
     GameScreen gs = screenStack.get(i);
     if (gs.processor() == null) continue;
     if (gs.processor().touchDragged(screenX, screenY, pointer) || gs.blocksInput()) return true;
   }
   return false;
 }