#NEWLINE# def sequencer( dt ) : #NEWLINE# #INDENT# global time_x , t0 , stage , last_current_scene #NEWLINE# time_x += dt #NEWLINE# if ( last_current_scene != director . scene ) : #NEWLINE# #INDENT# last_current_scene = director . scene #NEWLINE# report ( time_x ) #NEWLINE# #UNINDENT# if ( ( stage == 'run scene1' ) and ( time_x > 2.0 ) ) : #NEWLINE# #INDENT# stage = 'transition to scene2' #NEWLINE# print ( ( '\n%4.3f begin %s' % ( time_x , stage ) ) ) #NEWLINE# director . push ( FadeTransition ( scene2 , 0.5 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( stage == 'transition to scene2' ) and ( time_x > 5.0 ) ) : #NEWLINE# #INDENT# stage = 'transition to the top scene in the stack' #NEWLINE# print ( ( '\n%4.3f begin %s' % ( time_x , stage ) ) ) #NEWLINE# director . replace ( FadeTransitionWithPop ( director . scene_stack [ 0 ] , 0.5 ) )