private EnemySpaceShip SpawnEnemyUnit() { GameObject spawnedEnemyObject = _enemySpawner.Spawn(); EnemySpaceShip enemyShip = spawnedEnemyObject.GetComponent <EnemySpaceShip>(); if (enemyShip != null) { enemyShip.SetMovementTargets(_enemyMovementTargets); } return(enemyShip); }
private EnemySpaceShip SpawnEnemyUnit() { EnemySpaceShip enemyShip = enemySpawner.Spawn(). GetComponent <EnemySpaceShip>(); if (enemyShip != null) { enemyShip.SetMovementTargets(enemyMovementTargets); } return(enemyShip); }