Skip to content

Commit

Permalink
Update single game to use same expression for keys (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
fourlastor committed Jan 10, 2024
1 parent 8d30722 commit 5504e59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wiki/start/a-simple-game.md
Expand Up @@ -468,7 +468,7 @@ import java.util.Iterator;

import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.OrthographicCamera;
Expand Down Expand Up @@ -564,8 +564,8 @@ public class Drop extends ApplicationAdapter {
camera.unproject(touchPos);
bucket.x = touchPos.x - 64 / 2;
}
if(Gdx.input.isKeyPressed(Keys.LEFT)) bucket.x -= 200 * Gdx.graphics.getDeltaTime();
if(Gdx.input.isKeyPressed(Keys.RIGHT)) bucket.x += 200 * Gdx.graphics.getDeltaTime();
if(Gdx.input.isKeyPressed(Input.Keys.LEFT)) bucket.x -= 200 * Gdx.graphics.getDeltaTime();
if(Gdx.input.isKeyPressed(Input.Keys.RIGHT)) bucket.x += 200 * Gdx.graphics.getDeltaTime();

// make sure the bucket stays within the screen bounds
if(bucket.x < 0) bucket.x = 0;
Expand Down

0 comments on commit 5504e59

Please sign in to comment.