Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz committed Feb 18, 2012
1 parent 24030fa commit 88b090d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions admin/public/js/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ $(function(){

$(window).keypress(function(e){
if(e.which == 119) {
physics.movePaddle('1', -10);
physics.movePaddle('1', -25);
} else if(e.which == 115) {
physics.movePaddle('1', 10);
physics.movePaddle('1', 25);
} else if(e.which == 111) {
physics.movePaddle('2', -10);
physics.movePaddle('2', -25);
} else if(e.which == 108) {
physics.movePaddle('2', 10);
physics.movePaddle('2', 25);
}
});

Expand Down
4 changes: 2 additions & 2 deletions admin/public/js/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ var draw = function( drawables) {
var ballTop = drawables.ball.y - drawables.ball.radius - translate.y;
var ballLeft = drawables.ball.x - drawables.ball.radius - translate.x;
$("#ball").offset({ top: ballTop, left: ballLeft});
$("#paddle1").offset({top: drawables.paddle['1'].y1, left: drawables.paddle['1'].x1});
$("#paddle2").offset({top: drawables.paddle['2'].y1, left: drawables.paddle['2'].x1});
$("#paddle1").offset({top: drawables.paddle['1'].y1 - translate.y, left: drawables.paddle['1'].x1 - translate.x});
$("#paddle2").offset({top: drawables.paddle['2'].y1 - translate.y, left: drawables.paddle['2'].x1 - translate.x});

};

Expand Down

0 comments on commit 88b090d

Please sign in to comment.