public void draw(Graphics2D g2d, double time){
	double x = this.x * (1-time) + targetX * time;
	double y = this.y * (1-time) + targetY * time;
	x = x * WorldComponent.GRID_SIZE + WorldComponent.GRID_SIZE/2d;
	y = y * WorldComponent.GRID_SIZE + WorldComponent.GRID_SIZE/2d;

	double angle = getAngle(dir);
	switch(currentAction){
	case ACTION_TURN_LEFT:
	    angle -= Math.toRadians(90) * time;
	    break;
	case ACTION_TURN_RIGHT:
	    angle += Math.toRadians(90) * time;
	    break;
	case ACTION_TURN_AROUND:
	    angle += Math.toRadians(180) * time;
	    break;
	}

	AffineTransform trans = new AffineTransform();
	trans.translate(x, y);
	trans.rotate(angle);
	trans.translate(-robotImage1.getWidth()/2d, -robotImage1.getHeight()/2d);

	if(((int)(time * 10)) % 2 == 0 && currentAction < ACTION_TAKE_FUEL && currentAction > 0){
	    g2d.drawImage(robotImage2, trans, null);
	} else{
	    g2d.drawImage(robotImage1, trans, null);
	}

	if(shield){
	    trans = new AffineTransform();
	    trans.translate(x-25, y-25);
	    g2d.drawImage(shieldImage, trans, null);
	}

	double fuelCurrent = targetFuel * time + fuel * (1-time);
	if(fuelCurrent <= 0)
	    dead = true;

	//draw fuel indicator
	Arc2D fuelArc = new Arc2D.Double(x-10, y-10, 20, 20, -90, 360d*fuelCurrent/100d, Arc2D.OPEN);
	g2d.setStroke(new BasicStroke(3));
	g2d.setColor(Color.GREEN);
	g2d.draw(fuelArc);
    }