Hi. I tried to use the class constructor but it keeps throwing the error that the actor isn't in the world. BTW I'm trying to make a ring of asteroids around the actor. Any suggestions? :D
protected void addedToWorld(World w)
{
int x=getX(), y=getY(), num=10;
Asteroid a;
for (int i=0; i<num; i++)
{
a = new Asteroid();
w.addObject(a, x, y);
a.setRotation((int)(i*360/num));
a.move(20);
a.setRotation(0);
}
}addObject(new ActorName(), x, y);
public void addedToWorld(World world)
{
world.addObject(...
}