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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
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
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))
def get_image(): return res.gfx('kiwi.png', convert=True)
def get_image(): return res.gfx('lemon.png', convert=True)
def get_image(): return res.gfx('cherry.png', convert=True)
def get_image(): return res.gfx('steak.png', convert=True)
def get_image(): return res.gfx('watermelon.png', convert=True)
def get_image(): return res.gfx('fries.png', convert=True)
def get_image(): return res.gfx('avocado.png', convert=True)
def get_image(): return res.gfx('apple.png', convert=True)
def get_image(): return res.gfx('eggplant.png', convert=True)
def get_image(): return res.gfx('tangerine.png', convert=True)
def get_image(): return res.gfx('peach.png', convert=True)
def get_image(): return res.gfx('banana.png', convert=True)
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)