Open gsynuh opened 10 years ago
Right, there is an issue since Signals aren't removed. However I'm not sure that the removeAll method should be called in the State's destroy method:
So I think those Signals should be removed before new level / Signal assignement https://gist.github.com/alamboley/4024256#file-gistfile1-as-L13 What do you think ?
just a little update to this issue, apparently restartLevel in the box2D-starling example doesn't work
https://github.com/DaVikingCode/Citrus-Engine-Examples/blob/master/src/box2dstarling/ALevel.as ALevels should removeAll() listeners to their signals on destroy I think, its not made clear in the examples.
This gist https://gist.github.com/alamboley/4024256 Shows how to use the LevelManager and use those signals, yet I can see a potential ref to null error due to signals being dispatched when the actuall level has been destroyed because the listeners are still attached.