Richard
you mean the ones that you get when the scene is no longer the main
scene, and then its a child scene, so you send the events again?
how do you plan on doing it?
Lucio
Both the entering and exiting scene get an addition on_enter/on_exit. If
there's an enter and exit transition then there would be three
on_enters/on_exits for a given scene which is really only being displayed
once.
It means the semantics of on_enter and on_exit are muddled. What does an
invocation of them really mean?
How do you handle animation timing which should start "when the scene is
displayed"? How do you handle setting up expensive resources which shouldn't
be loaded outside of "when the scene is displayed"?
> how do you plan on doing it?
No idea at this point.
Richard
So, lets imagine we want to display a scene with an enter and exit
transition, we get:
start entenr transition: on_enter
end enter transition: on_exit, on_enter
scene runs..
start exit transition: on_exit, on_enter
finish exit transition: on_exit
you would like it to be:
start entenr transition: on_enter
end enter transition:
scene runs..
start exit transition:
finish exit transition: on_exit
>
> It means the semantics of on_enter and on_exit are muddled. What does an
> invocation of them really mean?
it means that the scene has entered or exited the 'stage'
the stage being whatever is being drawn at the moment.
>
> How do you handle animation timing which should start "when the scene is
> displayed"? How do you handle setting up expensive resources which shouldn't
> be loaded outside of "when the scene is displayed"?
being able to remove a scene and put it back on is useful for many
features of cocos, like transitions and pause.
if you need expensive precomputing done, use __init__
as dt is only fed to the scene when its on stage, you dont have to
worry about animation times and stuff like that.
>
>
>> how do you plan on doing it?
>
> No idea at this point.
This is the part that scares me. I understand this model and i like. I
think that just one enter/exit pair for transitions would be nice, but
im not sure i want to pay the cost.
Lucio.
riq.