Android Open Source - ZombieBird Input Handler






From Project

Back to project page ZombieBird.

License

The source code is released under:

Apache License

If you think the Android project ZombieBird listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kilobolt.ZBHelpers;
/*from   w  ww. j a  v  a  2  s  .  c o m*/
import com.badlogic.gdx.InputProcessor;
import com.kilobolt.GameObjects.Bird;

public class InputHandler implements InputProcessor {
  
  private Bird myBird;
  
  public InputHandler(Bird bird) {
    myBird = bird;
  }

  @Override
  public boolean keyDown(int keycode) {
    return false;
  }

  @Override
  public boolean keyUp(int keycode) {
    return false;
  }

  @Override
  public boolean keyTyped(char character) {
    return false;
  }

  @Override
  public boolean touchDown(int screenX, int screenY, int pointer, int button) {
    myBird.onClick();
    return true;  // return as true to say we handled the touch
  }

  @Override
  public boolean touchUp(int screenX, int screenY, int pointer, int button) {
    return false;
  }

  @Override
  public boolean touchDragged(int screenX, int screenY, int pointer) {
    return false;
  }

  @Override
  public boolean mouseMoved(int screenX, int screenY) {
    return false;
  }

  @Override
  public boolean scrolled(int amount) {
    return false;
  }
}




Java Source Code List

com.kilobolt.GameObjects.Bird.java
com.kilobolt.GameObjects.Grass.java
com.kilobolt.GameObjects.Pipe.java
com.kilobolt.GameObjects.ScrollHandler.java
com.kilobolt.GameObjects.Scrollable.java
com.kilobolt.GameWorld.GameRenderer.java
com.kilobolt.GameWorld.GameWorld.java
com.kilobolt.Screens.GameScreen.java
com.kilobolt.ZBHelpers.AssetLoader.java
com.kilobolt.ZBHelpers.InputHandler.java
com.kilobolt.ZombieBird.MainActivity.java
com.kilobolt.ZombieBird.Main.java
com.kilobolt.ZombieBird.RobovmLauncher.java
com.kilobolt.ZombieBird.ZBGame.java
com.kilobolt.ZombieBird.client.GwtLauncher.java