Jump to content

Destroying children of a group


kemz
 Share

Recommended Posts

My project consist of 3  js  files with two game state ( main and gameOver). One called levelManager which contain code  for  number of enemies to be spawn for different levels. The second one called main controls the game logic and increase the level. The third called gameOver.  The number of enemies to be spawn for each level are as follow:

 

level        number of enemies 

1                     1

2                      2

3                      3

4                      8

5                      9

..                       ..

..                      ..

The problem i have is : if  i kill the enemies( 

enemy.kill()

)  in level 1, instead of 2 enemies to be spawn in level 2  only one is spawn. Also, if  i kill the enemies in level 3 only 5 enemies are spawn in level 4. Any help please?

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...