On Thu, Apr 14, 2011 at 5:55 AM, equant <[email protected]> wrote:
> I can get a transition to work if I use push...
>
> director.push(FadeTransition(scene, duration=1))
>
> ... but with pop there's no scene to pass. I'm not sure how to make a
> transition happen when I pop. Any ideas?
>
> Thanks
>
What about
class FadeTransitionWithPop(FadeTransition):
def finish(self):
director.pop()
Warn: if the parent transition has nontrivial finish method you will need
some
extra adjusts
attached sample script pop_transitions2.py
Some comments:
Im unsure if all the proper on_exit are called, so this code can leak
resources.
Before looking more at that, I want to write some unit tests for director
and TransitionScene , I spotted some errors there.
After that I will revisit the issue.
Let me know if how it goes for you.
--
claudio
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en.
pop_transitions2.py
Description: Binary data
