#pragma strict

//var speed = 10.0f;
var players;

var colliderHelpers : GameObject[];

var navicellaWhite : Material;

function Start () {

	players = GameObject.FindGameObjectsWithTag("Player");
	

}

function Update () {

	for(var player : GameObject in players) {
		if(player != null) {
			for(var colliderHelper : GameObject in colliderHelpers) {
				
				var playerBounds : Bounds = player.renderer.bounds;
				
				playerBounds.max = playerBounds.max/2;
			
				if(colliderHelper.renderer.bounds.Intersects(playerBounds)) {
					//renderer.material = navicellaWhite;
					player.GetComponent(ParticleSystem).Play();
				}
			}
		}
	}
	
	//enemies = GameObject.FindGameObjectsWithTag("Nemici");
	
	
	
	
}