Exemplo n.º 1
0
 // Infinite stream of new triple-shot power-ups
 IEnumerator SpawnTripleShotPowerUps()
 {
     while (!gameOver)
     {
         Instantiate(tripleShotPrefab, Powerup.InitialPos(), Quaternion.identity);
         yield return(new WaitForSeconds(WaitForRandom(tripleShotPowerupSeconds)));
     }
 }
Exemplo n.º 2
0
    // Infinite stream of new speed power-ups
    IEnumerator SpawnSpeedPowerUps()
    {
        while (!gameOver)
        {
            yield return(new WaitForSeconds(WaitForRandom(speedPowerupSeconds)));

            Instantiate(speedPrefab, Powerup.InitialPos(), Quaternion.identity);
        }
    }