Пример #1
0
    def __init__(self, pos, screen, debug: bool = False):
        kiwi = res.gfx('kiwi.png', convert=True)
        Target.__init__(self, kiwi, pos, screen, debug)

        w, _h = kiwi.get_size()
        self.radius = int(w / 2.1)
        self.offset = (10, 10)
Пример #2
0
    def __init__(self, pos, screen, debug: bool = False):
        pineapple = res.gfx('pineapple.png', convert=True)
        Target.__init__(self, pineapple, pos, screen, debug)

        w, _h = pineapple.get_size()
        self.radius = int(w / 3.5)
        self.offset = (50, 65)
Пример #3
0
    def __init__(self, pos, screen, debug: bool = False):
        banana = res.gfx('banana.png', convert=True)
        Target.__init__(self, banana, pos, screen, debug)

        w, _h = banana.get_size()
        self.radius = int(w / 2.6)
        self.offset = (13, 23)
Пример #4
0
    def __init__(self, pos, screen, debug: bool = False):
        peach = res.gfx('peach.png', convert=True)
        Target.__init__(self, peach, pos, screen, debug)

        w, _h = peach.get_size()
        self.radius = int(w / 2.3)
        self.offset = (17, 23)
Пример #5
0
    def __init__(self, pos, screen, debug: bool = False):
        tangerine = res.gfx('tangerine.png', convert=True)
        Target.__init__(self, tangerine, pos, screen, debug)

        w, _h = tangerine.get_size()
        self.radius = int(w / 2.5)
        self.offset = (14, 25)
Пример #6
0
    def __init__(self, pos, screen, debug: bool = False):
        eggplant = res.gfx('eggplant.png', convert=True)
        Target.__init__(self, eggplant, pos, screen, debug)

        w, _h = eggplant.get_size()
        self.radius = int(w / 2.5)
        self.offset = (25, 25)
Пример #7
0
    def __init__(self, pos, screen, debug: bool = False):
        avocado = res.gfx('avocado.png', convert=True)
        Target.__init__(self, avocado, pos, screen, debug)

        w, _h = avocado.get_size()
        self.radius = int(w / 2.5)
        self.offset = (23, 25)
Пример #8
0
    def __init__(self, pos, screen, debug: bool = False):
        apple = res.gfx('apple.png', convert=True)
        Target.__init__(self, apple, pos, screen, debug)

        w, _h = apple.get_size()
        self.radius = int(w / 2.5)
        self.offset = (22, 25)
Пример #9
0
    def __init__(self, pos, screen, debug: bool = False):
        fries = res.gfx('fries.png', convert=True)
        Target.__init__(self, fries, pos, screen, debug)

        w, _h = fries.get_size()
        self.radius = int(w / 2.25)
        self.offset = (6, 6)
Пример #10
0
    def __init__(self, pos, screen, debug: bool = False):
        steak = res.gfx('steak.png', convert=True)
        Target.__init__(self, steak, pos, screen, debug)

        w, _h = steak.get_size()
        self.radius = int(w / 2.25)
        self.offset = (6, 6)
Пример #11
0
    def __init__(self, pos, screen, debug: bool = False):
        watermelon = res.gfx('watermelon.png', convert=True)
        Target.__init__(self, watermelon, pos, screen, debug)

        w, _h = watermelon.get_size()
        self.radius = int(w / 2.3)
        self.offset = (13, 25)
Пример #12
0
    def __init__(self, pos, screen, debug: bool = False):
        cherry = res.gfx('cherry.png', convert=True)
        Target.__init__(self, cherry, pos, screen, debug)

        w, _h =cherry.get_size()
        self.radius = int(w / 2.7)
        self.offset = (27, 65)
Пример #13
0
    def __init__(self, pos, screen, debug: bool = False):
        melon = res.gfx('melon.png', convert=True)
        Target.__init__(self, melon, pos, screen, debug)

        w, _h = melon.get_size()
        self.radius = int(w / 2.5)
        self.offset = (25, 25)
Пример #14
0
    def __init__(self, pos, screen, debug: bool = False):
        strawberry = res.gfx('strawberry.png', convert=True)
        Target.__init__(self, strawberry, pos, screen, debug)

        w, _h = strawberry.get_size()
        self.radius = int(w / 2.6)
        self.offset = (20, 30)
Пример #15
0
 def __init__(self, life_time, pos, is_fruit: bool = True):
     self.life_time = uniform(life_time - 0.5, life_time + 0.5)
     if is_fruit:
         img = choice(['exp1', 'exp2', 'exp3', 'exp4', 'exp5'])
     else:
         img = 'blood1'
     self.img = res.gfx(img + '.png', convert=True)
     self.pos = pos
Пример #16
0
    def __init__(self, pos):
        DirtySprite.__init__(self)
        self.pos = pos

        banana = res.gfx('Banana_happy.png', convert_alpha=True)

        self.img = pygame.transform.scale(banana, (256, 256))
        self.angle = 0
Пример #17
0
    def __init__(self):
        self.area = None
        self.position = (0, 0)
        self.radius = 10

        self.debug = True

        img = gfx('pointer-shield.png', convert=True)
        self.img = pygame.transform.scale(img,
                                          (self.radius * 2, self.radius * 2))
Пример #18
0
 def get_image():
     return res.gfx('kiwi.png', convert=True)
Пример #19
0
 def get_image():
     return res.gfx('lemon.png', convert=True)
Пример #20
0
 def get_image():
     return res.gfx('cherry.png', convert=True)
Пример #21
0
 def get_image():
     return res.gfx('steak.png', convert=True)
Пример #22
0
 def get_image():
     return res.gfx('watermelon.png', convert=True)
Пример #23
0
 def get_image():
     return res.gfx('fries.png', convert=True)
Пример #24
0
 def get_image():
     return res.gfx('avocado.png', convert=True)
Пример #25
0
 def get_image():
     return res.gfx('apple.png', convert=True)
Пример #26
0
 def get_image():
     return res.gfx('eggplant.png', convert=True)
Пример #27
0
 def get_image():
     return res.gfx('tangerine.png', convert=True)
Пример #28
0
 def get_image():
     return res.gfx('peach.png', convert=True)
Пример #29
0
 def get_image():
     return res.gfx('banana.png', convert=True)
Пример #30
0
 def __init__(self, image_file):
     pygame.sprite.Sprite.__init__(self)  # call Sprite initializer
     self.image = res.gfx(image_file, convert=True)
     self.rect = self.image.get_rect()
     self.rect.left, self.rect.top = (0, 0)