Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. for (int i = 0; i < 5; i++) {
  2. if (buttonup.isPressed()) {
  3. if (Gdx.input.isTouched(i)) {
  4. gamehero.heroBody.setLinearVelocity(0, 1f);
  5. Gdx.app.log("up is presd", "");
  6. }
  7. }
  8. if (buttonright.isPressed()) {
  9. if (Gdx.input.isTouched(i)) {
  10.  
  11.  
  12. gamehero.heroBody.setLinearVelocity(1.2f, 0);
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement