wieder den einfachen Sprung eingeführt
This commit is contained in:
parent
306cd62912
commit
cc07e4d919
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user