kemz Posted September 14, 2015 Share Posted September 14, 2015 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 12 23 34 85 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 More sharing options...
in mono Posted September 14, 2015 Share Posted September 14, 2015 From what you described it seems that everything happens in the same state, hence the said group is also the same. If you don't repopulate it with what you expect to be in it at each level change, this is expected to happen. Link to comment Share on other sites More sharing options...
Recommended Posts