25th Sep 2017, 5:12 PM
Sunil kumar Prusty
2 Respostas
+ 3
It doesn't work properly -- have you posted a comment on his code with what you're seeing / error message? How is the enemy detected (I think you mean shots hitting your ship)? By checking if each bullet intersects with ANY document element. While the "death" event is dispatched to all elements that are hit (including the enemy) only your ship responds to it. Here's a copy of the source with comments: https://code.sololearn.com/WBMYvnfDpyS3/?ref=app To hit the enemy with its own bullet: 22 var start = height; $("#enemy").on("death", function(){ end(); });
25th Sep 2017, 6:22 PM
Kirk Schafer
Kirk Schafer - avatar
0
this game not work.. properly
25th Sep 2017, 5:14 PM
Sunil kumar Prusty