Skip to content

Commit e78b7fb

Browse files
authored
W Key
1 parent ba704d6 commit e78b7fb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

js/spaceinvaders.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ PlayState.prototype.update = function(game, dt) {
367367
if(game.pressedKeys[68]) {
368368
this.ship.x += this.shipSpeed * dt;
369369
}
370+
371+
// W Key
372+
if(game.pressedKeys[87]) {
373+
this.fireRocket();
374+
}
370375

371376
// Keep the ship in bounds.
372377
if(this.ship.x < game.gameBounds.left) {

0 commit comments

Comments
 (0)