def add(self, center_x, center_y, explosion_ind=None): """Adds new explosion animation. Input parameters: center_x, center_y - absolute center coordinates of animation; explosion_ind - index of an animation in the list; if None then the animation is selected randomly (except small explosion).""" if explosion_ind == None: explosion_ind = randint(BLAST_EXPLOSION_IND, DOUBLE_EXPLOSION_IND) explosion = AnimatedSprite(self.images[explosion_ind], self.scr, self.view_pt, FRAME_COLS, FRAME_ROWS) explosion.set_center(center_x, center_y) explosion.repeat = False self.items.add(explosion)