public Projectile(int size, int range, int speed, int damage, Point startPoint, Point endPoint, String texture, int rotateDegree) {
		super(false, false, size, size, texture);
			this.shootRange = range;
			this.speed = speed;
			this.damage = damage;
			this.startPoint = startPoint;
			this.endPoint = endPoint;
			this.setPosition((int) startPoint.getX(), (int)startPoint.getY());
			m = (endPoint.getY() - startPoint.getY())/(endPoint.getX() - startPoint.getX());
			degree = rotateDegree;

			if(endPoint.getX() > startPoint.getX()){
				degree += Math.toDegrees(Math.atan(m));
			}else{
				degree += Math.toDegrees(Math.atan(m)) + 180;
			}

			// bugfix
			if((rotateDegree - degree)% 90 == 0 && startPoint.getX() == endPoint.getX()) degree += 180;
			
	}