Permalink
Browse files

forky movement bug fixed

  • Loading branch information...
1 parent 1091b0d commit 53f0df7ef92acc53cf762a6aaab2aa518c211838 @severest severest committed Nov 25, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 components.js
View
@@ -218,21 +218,17 @@ Crafty.c("OnJetpack", {
configMovement: function(acell, maxSpeed) {
this.bind('KeyDown', function () {
if (this.isDown('LEFT_ARROW') || this.isDown('A')) {
- this.movingRight = false;
this.movingLeft = true;
}
- else if (this.isDown('RIGHT_ARROW') || this.isDown('D')) {
+ if (this.isDown('RIGHT_ARROW') || this.isDown('D')) {
this.movingRight = true;
- this.movingLeft = false;
}
if (this.isDown('UP_ARROW') || this.isDown('W')) {
this.movingUp = true;
- this.movingDown = false;
}
- else if (this.isDown('DOWN_ARROW') || this.isDown('S')) {
+ if (this.isDown('DOWN_ARROW') || this.isDown('S')) {
this.movingDown = true;
- this.movingUp = false;
}
});

0 comments on commit 53f0df7

Please sign in to comment.