修复玩家2打不中敌人的bug

This commit is contained in:
zhengjun 2016-12-17 16:22:22 +08:00
parent 7dec83818a
commit 578a044b33
2 changed files with 3 additions and 1 deletions

2
debug.log Normal file
View File

@ -0,0 +1,2 @@
[1217/155715:ERROR:tcp_listen_socket.cc(76)] Could not bind socket to 127.0.0.1:6004
[1217/155715:ERROR:node_debugger.cc(86)] Cannot start debugger server

View File

@ -143,7 +143,7 @@ $(document).keydown(function(e){
if(e.keyCode == keyboard.SPACE && player1.lives > 0){ if(e.keyCode == keyboard.SPACE && player1.lives > 0){
player1.shoot(BULLET_TYPE_PLAYER); player1.shoot(BULLET_TYPE_PLAYER);
}else if(e.keyCode == keyboard.ENTER && player2.lives > 0){ }else if(e.keyCode == keyboard.ENTER && player2.lives > 0){
player2.shoot(BULLET_TYPE_ENEMY); player2.shoot(BULLET_TYPE_PLAYER);
}else if(e.keyCode == keyboard.N){ }else if(e.keyCode == keyboard.N){
nextLevel(); nextLevel();
}else if(e.keyCode == keyboard.P){ }else if(e.keyCode == keyboard.P){