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