Back to project page makipong.
The source code is released under:
GNU General Public License
If you think the Android project makipong listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package tk.makigas.makipong; // ww w.j a v a2 s .c o m import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.InputListener; public class PalaUserInput extends InputListener { private PalaActor pala; private float delta; public PalaUserInput(PalaActor pala) { this.pala = pala; } @Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { delta = event.getStageY(); return true; } @Override public void touchDragged(InputEvent event, float x, float y, int pointer) { pala.translate(0, event.getStageY() - delta); delta = event.getStageY(); } }