示例#1
0
 //Choose and spawn the next object
 private void SpawnNewObject()
 {
     if (obstaclesLeft < 3)
     {
         asteroidSpawner.state = AsteroidSpawner.State.Passive;
         Debug.Log("passive");
     }
     if (obstaclesLeft > 0 && shouldSpawnObject == true)
     {
         ThreeSigmaRule();
         ObjectPoolScript_.SetObject(ChosenObstacle, gameObject.transform.position);
         obstaclesLeft--;
     }
     else if (obstaclesLeft <= 0 && ZoneScript.m_still_playing)
     {
         ZoneScript.NextZone();
         shouldSpawnObject = false;
     }
 }