def __init__(self, dir, s_pos,t_pos,type='Arrow'): GFX.__init__(self) if ProjectileFX.rescache==None: ProjectileFX.rescache=Res('dc-item.png', TILESIZE) if type == 'Arrow': img = 73 if dir == MOVE_UP: img = img if dir == MOVE_UP_RIGHT: img += 1 if dir == MOVE_RIGHT: img += 2 if dir == MOVE_DOWN_RIGHT: img += 3 if dir == MOVE_DOWN: img += 4 if dir == MOVE_DOWN_LEFT: img += 5 if dir == MOVE_LEFT: img += 6 if dir == MOVE_UP_LEFT: img += 7 self.image=self.rescache.get(img) self.__pos_gen = self.__pos(s_pos, t_pos) self.redraw = True
def __init__(self, dir, s_pos, t_pos, type='Arrow'): GFX.__init__(self) if ProjectileFX.rescache == None: ProjectileFX.rescache = Res('dc-item.png', TILESIZE) if type == 'Arrow': img = 73 if dir == MOVE_UP: img = img if dir == MOVE_UP_RIGHT: img += 1 if dir == MOVE_RIGHT: img += 2 if dir == MOVE_DOWN_RIGHT: img += 3 if dir == MOVE_DOWN: img += 4 if dir == MOVE_DOWN_LEFT: img += 5 if dir == MOVE_LEFT: img += 6 if dir == MOVE_UP_LEFT: img += 7 self.image = self.rescache.get(img) self.__pos_gen = self.__pos(s_pos, t_pos) self.redraw = True
def __init__(self, dir, s_pos,t_pos,item): GFX.__init__(self) self.image=item.get_dd_img() self.__pos_gen = self.__pos(s_pos, t_pos) self.redraw = True
def __init__(self, color1, color2, s_pos, t_pos): GFX.__init__(self) self.f_image = [] surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) pygame.draw.circle(surf, color1, (15, 10), 2, 2) pygame.draw.circle(surf, color2, (10, 15), 2, 2) pygame.draw.circle(surf, color1, (20, 15), 2, 2) self.f_image.append(surf) surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) pygame.draw.circle(surf, color2, (15, 10), 2, 2) pygame.draw.circle(surf, color1, (10, 15), 2, 2) pygame.draw.circle(surf, color1, (20, 15), 2, 2) self.f_image.append(surf) surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) pygame.draw.circle(surf, color1, (15, 10), 2, 2) pygame.draw.circle(surf, color1, (10, 15), 2, 2) pygame.draw.circle(surf, color2, (20, 15), 2, 2) self.f_image.append(surf) self.c = 0 self.image = self.f_image[self.c] self.__pos_gen = self.__pos(s_pos, t_pos) self.redraw = False
def __init__(self, color1, color2, s_pos, t_pos, radius=1): GFX.__init__(self) self.f_image = [] surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) pygame.draw.circle(surf, color1, (16, 16), 2, 2) self.f_image.append(surf) surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) pygame.draw.circle(surf, color2, (16, 16), 2, 2) self.f_image.append(surf) surf = pygame.Surface((32, 32), pygame.SRCALPHA, 32) pygame.draw.circle(surf, color1, (16, 16), 2, 2) self.f_image.append(surf) self.color1 = color1 self.color2 = color2 self.c = 0 self.image = self.f_image[self.c] self.__pos_gen = self.__pos(s_pos, t_pos) self.redraw = False self.radius = radius self.cur_radius = 0 self.explode = False self.finish = False self.lastpos = None