var itemType:int=0;
var speed:float=5.0;

function Update () {


      transform.Translate(Vector3.left*Time.deltaTime*speed);


}

function OnTriggerEnter(  otherObject: Collider ){

	if(otherObject.gameObject.tag == "Player"){
	
	otherObject.gameObject.SendMessageUpwards("ApplyItem",itemType ,SendMessageOptions.DontRequireReceiver);

	Destroy(this.gameObject);
	}

}