wieder den einfachen Sprung eingeführt

This commit is contained in:
Armin Benz 2017-05-05 18:03:53 +02:00
parent 306cd62912
commit cc07e4d919
2 changed files with 4 additions and 4 deletions

View File

@ -16,14 +16,14 @@ public class RunBottomPlayerController extends AbstractPlayerController {
@Override
public void update(float delta) {
boolean down = Gdx.input.isKeyPressed(Input.Keys.SPACE) || Gdx.input.isTouched();
/*
if (!down && isJumping) {
if (Player.velocity.y > 0) Player.velocity.y = 0;
isJumping = false;
}
if (! down) isJumping = false;
*/
Player.velocity.y -= GRAVITY_FORCE * delta;
if (Player.velocity.y < -TERMINAL_VELOCITY) {

View File

@ -16,14 +16,14 @@ public class RunTopPlayerController extends AbstractPlayerController {
@Override
public void update(float delta) {
boolean down = Gdx.input.isKeyPressed(Input.Keys.SPACE) || Gdx.input.isTouched();
/*
if (!down && isJumping) {
if (Player.velocity.y < 0) Player.velocity.y = 0;
isJumping = false;
}
if (! down) isJumping = false;
*/
Player.velocity.y += GRAVITY_FORCE * delta;
if (Player.velocity.y > TERMINAL_VELOCITY) {