Open emurnane opened 8 years ago
I found it from controller.js, line 135:
if (GLOBAL.HOURITR > totalhourloops + (2 * GLOBAL.FPS)
&& GLOBAL.ENEMIES.length === 0) {
GLOBAL.HOURITR = 0;
GLOBAL.HOURENEMYNUMBER = 0;
GLOBAL.GAMEHOUR++;
GameInfoDisplay.hourSplash();
}
the GLOBAL.HOURITR increments by one every 1000/60 ms (see SGmain.js : line 36). When it hits beyond 1320 (which is totalhourloops + (2*GLOBAL.FPS)) and the array GLOBAL.ENEMIES is empty, the game proceeds to the next round. Whenever SGmain does player.update(), GLOBAL.ENEMIES is filtered with only enemies that are "active" (controller.js : line 75) and enemy.active is a function that return a boolean indicating whether they are inside the canvas (enemy.js : line 78)
Could someone confirm how many minutes or seconds a single wave lasts in PlayMail?
Please leave a comment to respond, and feel free to link to the relevant source code in the repo.