I’ve noticed, if you use “fade” effect in transitions between storyboard scenes, the enterScene event is firing twice… This can affect the behavior of the game, as we use enterScene to run other functions to init the game…
Besides, with the latest Daily Build, when I create a new game using the template, I’ve noticed it uses a new class “composer”, very similar to storyboard, but undocumented, and which have a new behavior in enter scene event -->> if event.phase == “will” then, and elseif phase == “did” then.
With this event.phase property I could avoid firing enterScene functions twice, as I can use event.phase, buy storyboard doesn’t have this property in enterScene event.
I don’t know if this is a bug or a misunderstanding of the API, could anyone clarify why is enterScene firing twice and what is this composer? will it replace storyboard?
I use Storyboard all the time with fades and I’ve never seen this double firing event unless you’re doing something to trigger a storyboard.gotoScene() call twice, like not catching the began and ended phase on a button press.
Now Composer will call scene:show() twice and you have to program for the “will” and “did” phase or else your code will execute twice.
Hi Rob, I wrote you on other post related with a bug in transitions. It seems the problem of enterScene firing twice triggers when canceling a transition using the object handle instead a transition handle.
I use Storyboard all the time with fades and I’ve never seen this double firing event unless you’re doing something to trigger a storyboard.gotoScene() call twice, like not catching the began and ended phase on a button press.
Now Composer will call scene:show() twice and you have to program for the “will” and “did” phase or else your code will execute twice.
Hi Rob, I wrote you on other post related with a bug in transitions. It seems the problem of enterScene firing twice triggers when canceling a transition using the object handle instead a transition handle.