public GameMovingObject(Vector2f startPosition, Vector2f endPosition, int width, int height, float speed, GameWorld world, boolean deadly)
	{
		this.startPosition = startPosition;
		this.endPosition = endPosition;
		this.speed = speed;
		this.world = world;
		this.deadly = deadly;
		this.width = width;
		this.height = height;
		currentPosition = startPosition;
		goalPosition = endPosition;
		
		object = new Body("moving object", new Box(width,height),Body.INFINITE_MASS);
		object.setPosition(currentPosition.x, currentPosition.y);
		object.setRotatable(false);
		object.setGravityEffected(false);
		object.setMaxVelocity(20, 20);
		
		randImg = Math.random()*2;
		int imageX = 0;
		if(randImg > 1)
			imageX = 200;
		try
		{
			if(deadly)
			{
				totalImage = ImageIO.read(getClass().getResource(Messages.sourceURI+"moving enemy.png"));
				objectImage = ((BufferedImage) totalImage).getSubimage(imageX, 0, 200, 200);
			}
			else
				objectImage = ImageIO.read(getClass().getResource(Messages.sourceURI+"platform.png"));
		} catch (IOException e)
		{
			e.printStackTrace();
		}
	}