Beware the #fire method

Like an idiot I created a #fire method in one of my enemy entity scripts. A simple script that made the enemy fire a projectile every few seconds. You know, just a simple = function() {/* blablabla */};

Launch the game to test… humm doesn’t work. Look the code over, everything looks fine. Put a few console.logs here and there. Seems like everything is flowing properly. Change a few things, try again… still nothing. Put a console.log before the call and one after… humm they both show up. Yet the enemy doesn’t fire a shot. I put a console.log in the fire method itself… lauch the game… how can that be… both the logs before and after show up but the one in the method itself doesn’t. If the engine couldn’t make the method call… it would throw an error, wouldn’t it, yet… no errors. That’s when it hit me. #fire must be part of the API… look at the docs and… yep… sure enough… it is. Well that was a fun 20 minutes. I miss TypeScript and VS Code.

Could you share code snippets?