I want a int from Button from another World and i don't know how to get it. This is just some code from my project.
Enemy is in world "FrogWorld"
"Options" is the world, where Button exist.
public class Enemy extends Actor
{
private int timer = ((Options) getWorld().getObjects(Button.class)).getDifficulty();
private int counter= ((Options) getWorld().getObjects(Button.class)).getDifficulty();
}public class Button extends Actor
{
int difficulty=70;
public int getDifficulty()
{
return difficulty;
}
}
