Progress: Client

This commit is contained in:
Jeremiah Billmann
2013-05-24 22:13:59 -04:00
parent 94c89e2254
commit dd688fa3f5
2 changed files with 34 additions and 30 deletions
+6
View File
@@ -16,16 +16,22 @@ $(function () {
handleInput = function (){
if(keyboard.pressed('left')) {
x -= 1;
GarageServerIO.addPlayerInput('left');
}
if(keyboard.pressed('right')) {
x += 1;
GarageServerIO.addPlayerInput('right');
}
if(keyboard.pressed('down')) {
y += 1;
GarageServerIO.addPlayerInput('down');
}
if(keyboard.pressed('up')) {
y -= 1;
GarageServerIO.addPlayerInput('up');
}
GarageServerIO.sendPlayerInput();
},
update = function () {