Finding the Vector3.Distance or an array of GameObjects

var enemies : GameObject[] = GameObject.FindGameObjectsWithTag("Enemy");

var distance = Vector3.Distance(enemies.transform.position,transform.position);

if(distance < Vector3(2,2,2)){
//DoSomething
}

This is what i've got so far, obviously transform cannot be accessed with just referencing an array, but how can I find and store the transforms off all the GamObject within the array.

Thanks - C

for (var enemy in enemies)
{
    ... enemy.transform.position ...

but why don't you place a sphere trigger on your player and enemy then listen for the trigger event...

The wonderful world of looping: http://answers.unity3d.com/questions/4102/how-do-i-use-for-to-create-loops-in-my-script-and-what-is-for