Ejemplo n.º 1
0
 private void Start()
 {
     instance         = this;
     gameplay         = false;
     gameOver         = false;
     enemyWaveSpawner = GameObject.FindGameObjectWithTag("EnemySpawner").GetComponent <EnemyWaveSpawner>();
 }
Ejemplo n.º 2
0
        private void StartSpawner()
        {
            var s = Instantiate(spawner, new Vector2(0, 8), Quaternion.identity);

            s.waves                = waves;
            activeSpawner          = s;
            activeSpawner.waveText = waveText;
        }
Ejemplo n.º 3
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        spawnEnemies = true;
        currentWave++;
        waveText.text = "Wave: " + currentWave;
    }
Ejemplo n.º 4
0
 /// <summary>
 /// Starts the enemy waves.
 /// </summary>
 private void StartWaves()
 {
     Shops.ForEach(shop => shop.StartSpawning());
     EnemyWaveSpawner.StartSpawning();
 }
Ejemplo n.º 5
0
 private void Start()
 {
     enemyWaveSpawner = GameObject.FindGameObjectWithTag("EnemySpawner").GetComponent <EnemyWaveSpawner>();
 }