Beispiel #1
0
    IEnumerator SpawnWaves()
    {
        yield return(new WaitForSeconds(1.0f));

        infoText.UpdateText("Defend yourself!\nHold for automatic fire!\nDouble tap to fire railgun!");
        infoText.FadeIn();
        yield return(new WaitForSeconds(3.0f));

        infoText.FadeOut();
        yield return(new WaitForSeconds(3.0f));

        while (gameOver == false)
        {
            yield return(StartCoroutine(Intermission()));

            enemies = (5 + 5 * wave) * (int)Mathf.Pow(1.1f, wave);
            ReduceEnemies(0);
            yield return(StartCoroutine(WaveTop(enemyHover, enemies, 1.0f * Mathf.Pow(0.9f, wave))));

            while (intermission == false && gameOver == false)
            {
                yield return(new WaitForSeconds(0.1f));
            }
        }
    }
Beispiel #2
0
 public void UpdateAmmoText()
 {
     ammoText.UpdateText("Railgun: " + PlayerController.current.ammo + "\nArmor: " + PlayerController.current.health);
     if (ammoText.IsEmpty())
     {
         ammoText.FadeIn();
     }
 }
Beispiel #3
0
 public void UpdateEnemyText()
 {
     enemyCounterText.UpdateText("Enemies: " + enemies);
     if (enemyCounterText.IsEmpty())
     {
         enemyCounterText.FadeIn();
     }
 }