#NEWLINE# def get_action( self , e , times = 1 ) : #NEWLINE# #INDENT# 'returns the actions for a specific effects' #NEWLINE# ( w , h ) = director . get_window_size ( ) #NEWLINE# center = ( ( w / 2.0 ) , ( ( ROWS * SQUARE_SIZE ) / 2.0 ) ) #NEWLINE# if ( e == Colors . ROTATE ) : #NEWLINE# #INDENT# a = RotateBy ( ( 360 * times ) , duration = ( self . duration * times ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( e == Colors . SCALE ) : #NEWLINE# #INDENT# a = ( ScaleTo ( 0.5 , duration = ( self . duration / 2.0 ) ) + ScaleTo ( 1 , duration = ( self . duration / 2.0 ) ) ) #NEWLINE# a *= times #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( e == Colors . LIQUID ) : #NEWLINE# #INDENT# a = ( Liquid ( grid = self . grid_size , waves = ( ( self . duration * times ) // 2 ) , duration = ( self . duration * times ) ) + StopGrid ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( e == Colors . WAVES ) : #NEWLINE# #INDENT# a = ( Waves ( grid = self . grid_size , waves = ( ( self . duration * times ) // 2 ) , duration = ( a . duration * times ) ) + StopGrid ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( e == Colors . TWIRL ) : #NEWLINE# #INDENT# a = ( Twirl ( grid = self . grid_size , center = center , twirls = ( ( self . duration * times ) // 2 ) , duration = ( self . duration * times ) ) + StopGrid ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( e == Colors . LENS ) : #NEWLINE# #INDENT# ( w , h ) = director . get_window_size ( ) #NEWLINE# a = ( Lens3D ( radius = ( h // 2 ) , grid = self . grid_size , duration = ( self . duration * times ) ) + StopGrid ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( ( 'Effect not implemented: %s' % str ( e ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return a