how find the wombat the leafes and move to them ?
private Actor leaf;
public void act()
{
if (leaf != null)
{
if (getX() < leaf.getX()) setLocation(getX()+1, getY());
else (getX() > leaf.getX()) setLocation(getX()-1, getY());
else (getY() < leaf.getY()) setLocation(getX(), getY()+1);
else (getY() > leaf.getY()) setLocation(getX(), getY()-1);
else removeTouching(Leaf.class);
}
else
{
leaf = getWorld().getObjects(Leaf.class).get(0);
}
}