public void update(){
		
		if(endPoint.getX() > startPoint.getX()){
			x += speed*Math.cos(Math.atan(m));
			y += speed*Math.sin(Math.atan(m));
		}else if(endPoint.getX() < startPoint.getX()){
			x -= speed*Math.cos(Math.atan(m));
			y -= speed*Math.sin(Math.atan(m));
		}else if(endPoint.getX() == startPoint.getX()){
			
			if(endPoint.getY() > startPoint.getY()){
				y += speed;
			}else{
				y -= speed;
			}
			
		}
		
		range = (int) Math.sqrt(Math.pow((x-startPoint.getX()),2)+Math.pow((y-startPoint.getY()),2));
		if(range > shootRange || hasCollision()) destroy();
	}