I'm trying to automatically place an actor in my world, but I want the actor to be rotated. I can't create another actor in the rotated form, I have to actually rotate the original actor in my world code. Any advice?


1 2 3 4 5 6 | // instead of addObject( new Actor(){}, x y); // use this Actor actor = new Actor(){}; actor.turn( 180 ); addObject(actor, x, y); |
1 2 3 4 | public WallSize45_1( boolean rotated) { if (rotated) setRotation( 90 ); } |
1 | addObject( new WallSize45_1( true ), .... |
1 2 3 4 5 6 | // instead of addObject( new Actor(){}, x y); // use this Actor actor = new Actor(){}; actor.turn( 90 ); // edited from 180 above addObject(actor, x, y); |