#NEWLINE# def main( ) : #NEWLINE# #INDENT# director . init ( ) #NEWLINE# bg_layer = cocos . layer . ColorLayer ( 255 , 0 , 0 , 255 ) #NEWLINE# translate_layer = cocos . layer . Layer ( ) #NEWLINE# ( x , y ) = director . get_window_size ( ) #NEWLINE# translate_layer . x = ( x // 2 ) #NEWLINE# translate_layer . y = ( y // 2 ) #NEWLINE# translate_layer . add ( bg_layer ) #NEWLINE# main_scene = cocos . scene . Scene ( translate_layer ) #NEWLINE# director . run ( x )