I have this code and in the line I get an NullPointerException. The setValue method is executed by an another actor a few seconds after world initiating.
bar.setValue(value);
Bar bar;
boolean created;
public ActorL()
{
bar = new Bar();
created = false;
.....
}
public void act()
{
if(!created)
{
getWorld().addObject(bar,0,0);
created = true;
}
true;
}
public void setValue(int value)
{
bar.setValue(value);
}

