//Lock scene changes to only 1 at a time. At sending the bridge events during the
//scene change, it could occur that a scene change could be triggered again which we prevent
if (!sceneChangeLocked){
sceneChangeLocked = true;
Iscene lastScene = this.getCurrentScene();
//Remove pending animations //
//FIXME problemes, if new animations are defined in a scenes constructor, they get removed here..
//AnimationManager.getInstance().clear();
//Flush events so that enqueued input ended get sent to the last scene
//(Problem: they have been removed from active cursor pool already so they dont
//appear there and no ended and started evts are sent to the scenes!
//IF input started or updated should be flushed with this they should appear in active
//cursor list after that and be sended the right events
//- maybe only flush input_ended?
for (AbstractInputSource abstractInputSource : getInputManager().getInputSources()) {
abstractInputSource.flushEvents();
}
//Check which cursors are still active and clone their last evt as INPUT_ENDED
//so the scene can complete its state (i.e. buttons are be released etc)
this.sendEndedEvents(lastScene);
//Disable the last scene's global input processors
this.getInputManager().disableGlobalInputProcessors(lastScene);
// /*
if (lastScene.getTransition() != null){
ITransition t = lastScene.getTransition();
this.pendingTransition = new TransitionInfo(t, lastScene, newScene);
t.init();
t.setup(lastScene, newScene);
return true;
}else{