Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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))
Ejemplo n.º 18
0
 def get_image():
     return res.gfx('kiwi.png', convert=True)
Ejemplo n.º 19
0
 def get_image():
     return res.gfx('lemon.png', convert=True)
Ejemplo n.º 20
0
 def get_image():
     return res.gfx('cherry.png', convert=True)
Ejemplo n.º 21
0
 def get_image():
     return res.gfx('steak.png', convert=True)
Ejemplo n.º 22
0
 def get_image():
     return res.gfx('watermelon.png', convert=True)
Ejemplo n.º 23
0
 def get_image():
     return res.gfx('fries.png', convert=True)
Ejemplo n.º 24
0
 def get_image():
     return res.gfx('avocado.png', convert=True)
Ejemplo n.º 25
0
 def get_image():
     return res.gfx('apple.png', convert=True)
Ejemplo n.º 26
0
 def get_image():
     return res.gfx('eggplant.png', convert=True)
Ejemplo n.º 27
0
 def get_image():
     return res.gfx('tangerine.png', convert=True)
Ejemplo n.º 28
0
 def get_image():
     return res.gfx('peach.png', convert=True)
Ejemplo n.º 29
0
 def get_image():
     return res.gfx('banana.png', convert=True)
Ejemplo n.º 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)