add: other spawn points

update: mroe enemies spawn after completing level
This commit is contained in:
KOSMOGOR
2025-04-28 11:34:43 +03:00
parent 799acc0215
commit a8cce441c3
4 changed files with 765 additions and 5 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ public class GameController : MonoBehaviour
}
void SpawnEnemies(string sceneName, float timeSpent) {
int enemiesToAdd = (int)(timeSpent / 10);
int enemiesToAdd = (int)(timeSpent / 10) + 1;
levels.ForEach(li => {
if (li.scene.name == sceneName || IsLevelDestroyed(li.scene.name)) return;
for (int i = 0; i < enemiesToAdd; ++i) AddEnemyInLevel(SelectEnemyWeighted().prefab, li.scene.name);