private void SpawnNewEnemy(int enemy, Lane lane) { GameObject newEnemy = Instantiate(enemyModels[enemy], GetPosition(lane), Quaternion.identity, enemyList.transform); Airship newEnemyRenderer = newEnemy.GetComponent <Airship>(); lane.SetAirship(newEnemyRenderer); enemyList.AddEnemy(newEnemyRenderer); newEnemyRenderer.SetManagingObjects(metalManager, enemyList); }
private void Start() { //Adds itself to the global enemy list. EnemyList.AddEnemy(this); area = gameObject.GetComponent <SpriteRenderer>(); }