This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by gxxaxx

Have a simple game.
Player vs. Monsters.

I'm killing the monsters okay this.kill()

Was wondering though, where would I put my logic to determine when all of the monsters have been "killed".


1 decade ago by delly

maybe on main.js or your main game loop ?

something like:
var monsters = this.getEntitiesByType( EntityMonster );
if (monsters.length == 0) {
   // All of monster have been killed

1 decade ago by gxxaxx

That worked like a charm. Thanks.
Page 1 of 1
« first « previous next › last »