Skip to content

Commit

Permalink
Added kill command for player
Browse files Browse the repository at this point in the history
  • Loading branch information
LIONisaQT committed Oct 22, 2018
1 parent 7934b93 commit 3663b3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/src/io/github/lionisaqt/actors/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private void handleInput(float deltaTime) {
if (Gdx.input.isKeyPressed(Input.Keys.UP)) ySpeed += info.speed;
if (Gdx.input.isKeyPressed(Input.Keys.DOWN)) ySpeed += -info.speed;
if (Gdx.input.isKeyPressed(Input.Keys.SPACE)) shoot(deltaTime);
if (Gdx.input.isKeyJustPressed(Input.Keys.K)) info.hp = 0;
else isShooting = false;
default:
break;
Expand Down
4 changes: 2 additions & 2 deletions core/src/io/github/lionisaqt/screens/InGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ void handleInput() {
case iOS:
break;
case Desktop:
if (Gdx.input.isKeyJustPressed(Input.Keys.Q)) decreaseGameSpeed();
if (Gdx.input.isKeyJustPressed(Input.Keys.W)) increaseGameSpeed();
if (Gdx.input.isKeyPressed(Input.Keys.Q)) decreaseGameSpeed();
if (Gdx.input.isKeyPressed(Input.Keys.W)) increaseGameSpeed();
if (Gdx.input.isKeyJustPressed(Input.Keys.O)) addScore(10000);
if (Gdx.input.isKeyJustPressed(Input.Keys.P)) {
if (pauseButton.isTouchable()) pause();
Expand Down

0 comments on commit 3663b3d

Please sign in to comment.