Commit a0f44165 authored by Valentin Bartschies's avatar Valentin Bartschies
Browse files

Add "A" and "D" for moving left and right

parent 75fd37d0
......@@ -37,11 +37,11 @@ void initGame() {
}
void calcGame() {
if (IsKeyDown(KEY_LEFT)) {
if (IsKeyDown(KEY_LEFT) || IsKeyDown(KEY_A)) {
if (laserCanonPos.x > 0) {
laserCanonPos.x -= LASER_CANON_SPEED;
}
} else if (IsKeyDown(KEY_RIGHT)) {
} else if (IsKeyDown(KEY_RIGHT) || IsKeyDown(KEY_D)) {
if (laserCanonPos.x < (GAME_SCREEN_WIDTH - 1) - CANON_TEXTURE.width) {
laserCanonPos.x += LASER_CANON_SPEED;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment