Open tbalouet opened 7 years ago
cf https://github.com/tbalouet/WebVRDefender/blob/gamedynamics/client/js/components/enemy.js#L9 to instead emit a healthDrecrease event then check within
regarding "hit" the castle is that reproducible? Because enemy damaging the castle should be done via targetReach hence it shouldn't conflict
The goal is listening to the hit event there: https://github.com/tbalouet/WebVRDefender/blob/gamedynamics/client/js/components/goal.js#L24
target-reach component is never used in the project
My bad I meant movingended
, I’ll update the listener and emit accordingly.
Should be fixed with the last commits on https://github.com/tbalouet/WebVRDefender/commits/gamedynamics , please have a look that it's correct in particular regarding NAF. I assume leaving the game logic (i.e. going from hit to kill) locally rather than by the server is correct but I'm unsure.
If that's OK then feel free to close this issue.
As of today, to kill an enemy you need to only look at it for 1sec or so. Would be cool to need touchpad touch to send a shot, and to require multiple shots to kill enemys (some enemys being more resistant than others) Would be cool to have visual and audio feedback on the shots as well Also, as of now the same event "hit" is sent for enemys to attack castle and for players to attack enemys. Which means that the player can attack the castle. That shouldn't happen