コード例 #1
0
 def setup_frames(self):
     """Set the frames to a list"""
     for num in xrange(2, -1, -1):
         self.frames.append(
             IMAGE_SLIDER.get_image('question_mark_{}'.format(num)))
     for num in xrange(0, 3):
         self.frames.append(
             IMAGE_SLIDER.get_image('question_mark_{}'.format(num)))
コード例 #2
0
 def __init__(self, x, y, image='red_floor'):
     pg.sprite.Sprite.__init__(self)
     self.image = IMAGE_SLIDER.get_image(image)
     self.rect = self.image.get_rect()
     self.rect.x = x
     self.rect.y = y
     self.mask = pg.mask.from_surface(self.image)
コード例 #3
0
    def setup_frames(self):
        """create the frame list"""
        self.frames = []

        image = IMAGE_SLIDER.get_image('broken_brick',
                                       multiplier=BRICK_SIZE_MULTIPLIER)
        reversed_image = pg.transform.flip(image, True, False)

        self.frames.append(image)
        self.frames.append(reversed_image)
コード例 #4
0
    def __init__(self, x, y, level, contents='6coins'):

        Brick.__init__(self, x, y, self.setup_frames, contents)

        self.frame_index = 0
        self.level = level
        self.image = self.frames[self.frame_index]
        self.opened_frame = [IMAGE_SLIDER.get_image('question_mark_3')]
        self.rect = self.image.get_rect()
        self.rect.x = x
        self.rect.y = y
        self.coin_total = 1
        self.current_time = 0
コード例 #5
0
 def setup_frames(self):
     """Set the frames to a list"""
     self.frames.append(IMAGE_SLIDER.get_image('red_brick'))
     self.frames.append(IMAGE_SLIDER.get_image('empty_brick'))
コード例 #6
0
 def __init__(self, x, y, image ):
     pg.sprite.Sprite.__init__(self)
     self.image = IMAGE_SLIDER.get_image(image)
     self.rect = self.image.get_rect()
     self.rect.x = x
     self.rect.y = y