I have a slightly better solution:
 
When isinstance(director.scene, cocos.scenes.transitions.TransitionScene) 
is True you are in a transisiton :D
 
This works in layers and scenes.
 

On Thursday, November 8, 2012 6:51:28 PM UTC-5, Ryan Hope wrote:

> Awesome, I also needed this info!
>
> On Friday, May 18, 2012 2:53:35 PM UTC-4, Winston wrote: 
>>
>> This is an old thread, but I found it when searching for how to tell when 
>> on_enter() is called from a transition versus from my actual scene 
>> starting. I'll post the answer for the next person. In your on_enter() 
>> method, when "director.scene != self", then you might be in a transition.
>>  
>> -Winston 
>>  
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/cocos-discuss/-/rLhncOUIBjcJ.
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.

Reply via email to