예제 #1
0
    private void StartContinueGame(int additionalAsteroids = 0, int newAsteroidSplitAmount = 0, int numEnemiesToSpawn = 0)
    {
        asteroidController.SpawnAsteroids(STARTING_ASTEROIDS + additionalAsteroids, newAsteroidSplitAmount);
        allAsteroidsDestroyed = false;

        // if there are no enemies to spawn this wave, flag they are all destroyed, then back out
        if (numEnemiesToSpawn == 0)
        {
            allEnemiesDestroyed = true;
            return;
        }

        // otherwise, tell the controller how many enemies need to be spawned this wave and flag that they are to be killed
        enemyController.SetupEnemySpawning(numEnemiesToSpawn);
        allEnemiesDestroyed = false;
    }