def startup(self, now, persistant): self.game_controller.screen.fill(Color.BLACK) def callback(sc): sc.blit(self.image, (0,0)) credit.credit_from_file('resource/text/intro.txt',self.font, Color.WHITE, 15, callback)
def credits(self): """ Créditos """ self.logos = [] self.logos.append( self.game_controller.asset_manager.get_scalled_image('pygame.png', 0.5).convert_alpha() ) self.logos.append( self.game_controller.asset_manager.get_scalled_image('pycharm.png', 0.5).convert_alpha() ) self.logos.append( self.game_controller.asset_manager.get_scalled_image('gimp.png', 0.75).convert_alpha() ) self.logos.append( self.game_controller.asset_manager.get_scalled_image('inkscape.png', 0.5).convert_alpha() ) self.logos.append( self.game_controller.asset_manager.get_scalled_image('audacity.png', 0.5).convert_alpha() ) self.y = 0 def callback_credits(sc): for i, logo in enumerate(self.logos): x = self.game_controller.width - logo.get_width() sc.blit(logo, (x,self.y + i * 100) ) self.y += 1 if self.y > self.game_controller.height: self.y = -self.game_controller.height # self.screen.fill(Color.GRAY) self.screen.fill(Color.BLACK) credit.credit_from_file('resource/text/credits.txt', self.fontsmall, Color.WHITE, 20, callback_credits)