Beispiel #1
0
    def render(self):
        screen.fill(color.WHITE)
        
        for i in self.group_list:
            i.draw(screen)

        display.flip()
        assert not config.show_fps()
        #^ So this statement is stripped in Release mode.

        config.fps_timer.tick_busy_loop(60 * _limit_frame)
Beispiel #2
0
    def render(self):
        screen.fill(color.WHITE)

        for i in self.group_list:
            i.draw(screen)

        display.flip()
        assert not config.show_fps()
        #^ So this statement is stripped in Release mode.

        config.fps_timer.tick_busy_loop(60 * _limit_frame)
Beispiel #3
0
    def render(self):
        '''
        Blits all Sprites (or derived) to the screen.

        Remember, Group.blit() renders Sprites in arbitrary order, so we must
        assign Sprites to groups by layer, then call Group.blit() sequentially.
        '''
        screen.fill(color.BLACK)
        STARS.emit()
        
        for i in self.group_list:
        #For all sprite groups this GameState holds...
            i.draw(screen)

        assert not config.show_fps()
        #^ So this statement is stripped in Release mode.

        config.fps_timer.tick(60 * config._limit_frame)
Beispiel #4
0
    def render(self):
        '''
        Blits all Sprites (or derived) to the screen.

        Remember, Group.blit() renders Sprites in arbitrary order, so we must
        assign Sprites to groups by layer, then call Group.blit() sequentially.
        '''
        screen.fill(color.BLACK)
        STARS.emit()

        for i in self.group_list:
            #For all sprite groups this GameState holds...
            i.draw(screen)

        assert not config.show_fps()
        #^ So this statement is stripped in Release mode.

        config.fps_timer.tick(60 * config._limit_frame)