hello guys, firstly - thanks to you all for this fantastic and well documented engine and this community.
I'm starting with box2D and also moving from AS2 to AS3 and I have (hope not so stupid) question:
Can anybody please suggest the best way, how to "reset" the world? I mean, i try to create game with custom visible graphics attached to bodies and I need in my game safely go from one level to another - so what is the best way, how to remove all or some of unnecessary dynamic (with their custom data attached using UserData) and static bodies from my current game scene and create another ones, and also change some engine parameters (for example gravity)?
Do you use different frames on timeline for different level of game, or every level of game have its own scene in flash document or just changing or removing bodies and graphic staying within one same frame?
Some pseudocode or hints or peace of real code will be very helpful.
I tried some search in the forum, but did not find anything.
Thanks.
I'm starting with box2D and also moving from AS2 to AS3 and I have (hope not so stupid) question:
Can anybody please suggest the best way, how to "reset" the world? I mean, i try to create game with custom visible graphics attached to bodies and I need in my game safely go from one level to another - so what is the best way, how to remove all or some of unnecessary dynamic (with their custom data attached using UserData) and static bodies from my current game scene and create another ones, and also change some engine parameters (for example gravity)?
Do you use different frames on timeline for different level of game, or every level of game have its own scene in flash document or just changing or removing bodies and graphic staying within one same frame?
Some pseudocode or hints or peace of real code will be very helpful.
I tried some search in the forum, but did not find anything.
Thanks.