var bulletSpeed: int;
var damage:int=10;
var explosion: Transform;

var doubleFlag:boolean=false;

function Update () {


Move = bulletSpeed * Time.deltaTime;

transform.Translate(Vector3.right * Move);
if(doubleFlag) transform.Translate(Vector3.up* Move);
                       



	Destroy(gameObject,1.5);




}



function OnTriggerEnter(  otherObject: Collider        ){

if(otherObject.gameObject.tag == "enemy"){

	
	var tempExplosion: Transform;
	
	tempExplosion = Instantiate(explosion, transform.position, transform.rotation);
	
	
		
	otherObject.gameObject.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver);
	

	
	Destroy(this.gameObject);
	
}

}