Exemplo n.º 1
0
    void SpawnEnemies(Transform enemy, List <Transform> spawnPoints)
    {
        Transform spawnPoint = spawnPoints[Random.Range(0, spawnPoints.Count)];

        enemy = Instantiate(enemy, spawnPoint.position, spawnPoint.rotation);

        EnemyBehaviour enemyBehaviour = enemy.gameObject.GetComponent <EnemyBehaviour>();

        enemyBehaviour.BuffHealth(healthBuff);
        enemyBehaviour.BuffScore(scoreBuff);
        enemy.gameObject.GetComponent <EnemyWeapon>().BuffDamage(damageBuff);
    }