Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < 5; i++) {
- if (buttonup.isPressed()) {
- if (Gdx.input.isTouched(i)) {
- gamehero.heroBody.setLinearVelocity(0, 1f);
- Gdx.app.log("up is presd", "");
- }
- }
- if (buttonright.isPressed()) {
- if (Gdx.input.isTouched(i)) {
- gamehero.heroBody.setLinearVelocity(1.2f, 0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement