Пример #1
0
    def __init__(self, control):
        """ Do not override this unless there is a special need.

        All init for the State, loading of config, images, etc should
        be done in State.startup or State.resume, not here.

        :param control: State Manager / Control / Game... all the same
        :returns: None
        """
        self.game = control  # TODO: rename 'game' to 'control'?
        self.start_time = 0.0
        self.current_time = 0.0
        self.animations = pygame.sprite.Group()  # only animations and tasks
        self.sprites = SpriteGroup()  # all sprites that draw on the screen
Пример #2
0
 def create_new_menu_items_group(self):
     # these groups will not automatically position the sprites
     self.menu_items = MenuSpriteGroup()
     self.menu_sprites = SpriteGroup()