Scene Transition done notification

Scene Transition done notification
0.0 0



I have several scenes and I am swapping with transitions. Eg.

    var scene = cc.Scene.create();
    cc.Director.getInstance().replaceScene(cc.TransitionFade.create(1.2, scene));

What is called to notify me when the transition is complete? Is there a method I can override in my scene class to let me know when it is done?



Hmmm… I believe the onEnter method is the first one called when a Scene pop’s up. Have you tried placing your code there?


This does not seem to be working.

My scene extended from Layer

var sceneGame = cc.Layer.extend({

my onEnter in sceneGame

onEnter:function () { super.onEnter(); this.gameManager.setStatus( GameManager.gameStatusDropping ); },

Have I missed something here? Basically what I am trying to do is call the setStatus as soon as the scene as finished fading in from the TransitionFade.


@pjdavis1970 wrote:

My scene extended from Layer
var sceneGame = cc.Layer.extend({

Well, there’s your problem. It should be var sceneGame = cc.Scene.extend({. Maybe you should investigate the differences between Scene and Layer a bit:


WOW how did I not even notice that lol.

Thanbks :slight_smile: