#NEWLINE# def __init__( self , pos_init , speed , SCREEN_WIDTH , SCREEN_HEIGHT ) : #NEWLINE# #INDENT# pygame . sprite . Sprite . __init__ ( self ) #NEWLINE# self . pos = vec2d ( pos_init ) #NEWLINE# self . speed = speed #NEWLINE# self . width = int ( ( pos_init * 0.1 ) ) #NEWLINE# image = pygame . Surface ( ( self . width , ( SCREEN_HEIGHT * 1.5 ) ) ) #NEWLINE# image . fill ( ( 0 , 0 , 0 , 0 ) ) #NEWLINE# image . set_colorkey ( ( 0 , 0 , 0 ) ) #NEWLINE# color = ( 120 , 240 , 80 ) #NEWLINE# pygame . draw . rect ( image , color , ( 0 , 0 , self . width , ( SCREEN_HEIGHT * 0.5 ) ) , 0 ) #NEWLINE# pygame . draw . rect ( image , color , ( 0 , ( SCREEN_HEIGHT * 1.05 ) , self . width , ( SCREEN_HEIGHT * 0.5 ) ) , 0 ) #NEWLINE# self . image = image #NEWLINE# self . rect = self . image . get_rect ( ) #NEWLINE# self . rect . center = pos_init