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

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

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