修复玩家2打不中敌人的bug
This commit is contained in:
parent
7dec83818a
commit
578a044b33
2
debug.log
Normal file
2
debug.log
Normal 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
|
@ -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){
|
||||||
|
Loading…
Reference in New Issue
Block a user