예제 #1
0
 private void RoundLogic()
 {
     spawner.AsteroidSplitDepth = asteroidSplitCount;
     //Add 0 or 1 asteroids per round.
     spawner.numberOfAsteroids += Random.Range(0, 2);
     //Clamp asteroid count to max asteroids.
     spawner.numberOfAsteroids = Mathf.Clamp(spawner.numberOfAsteroids, 3, MaxAsteroids);
     spawner.roundSpawn();
     ufoCount       += 0.5f;
     currentUFOCount = (int)ufoCount;
     StartCoroutine(UFOSpawnRoutine());
 }
예제 #2
0
 private IEnumerator AsteroidSpawnRoutine()
 {
     //Call Asteroid Spawner to spawn a round's worth of asteroids
     asteroidSpawner.roundSpawn();
     yield return(null);
 }