def __init__(self, name, pos, sprite, sprite_empty, effect, times): Entity.__init__(self, name, pos, sprite) self.effect = effect self.times = times self.sprite_empty = pg.transform.scale( pg.image.load(sprite_empty).convert_alpha(), (TILE_SIZE, TILE_SIZE))
def __init__(self, pos, sprite_close, sprite_open, potential_items): Entity.__init__(self, "Chest", pos, sprite_close) self.sprite_open_link = sprite_open self.sprite_close_link = sprite_close self.sprite_open = pg.transform.scale( pg.image.load(sprite_open).convert_alpha(), (TILE_SIZE, TILE_SIZE)) self.item = Chest.determine_item(potential_items) self.opened = False self.pick_lock_initiated = False
def __init__(self, name, pos, sprite, interaction=None): Entity.__init__(self, name, pos, sprite) self.sprite_name = sprite self.interaction = interaction self.door_sfx = pg.mixer.Sound(os.path.join('sound_fx', 'door.ogg')) self.gold_sfx = pg.mixer.Sound(os.path.join('sound_fx', 'trade.ogg')) self.talk_sfx = pg.mixer.Sound(os.path.join('sound_fx', 'talking.ogg')) self.inventory_sfx = pg.mixer.Sound(os.path.join('sound_fx', 'inventory.ogg'))
def __init__(self, name, pos, sprite, hp, defense, res): Entity.__init__(self, name, pos, sprite) self.hp_max = hp self.hp = hp self.defense = defense self.res = res self.attack_sfx = pg.mixer.Sound(os.path.join('sound_fx', 'attack.ogg'))
def __init__(self, pos, sprite_close, sprite_open, potential_items): Entity.__init__(self, "Chest", pos, sprite_close) self.sprite_open_link = sprite_open self.sprite_close_link = sprite_close self.sprite_open = pg.transform.scale( pg.image.load(sprite_open).convert_alpha(), (TILE_SIZE, TILE_SIZE)) self.item = Chest.determine_item(potential_items) self.opened = False self.pick_lock_initiated = False self.chest_sfx = pg.mixer.Sound(os.path.join('sound_fx', 'chest.ogg'))
def __init__(self, pos_first, sprite): Entity.__init__(self, "Portal", pos_first, sprite) self.linked_to = None
def __init__(self, name, pos, sprite, hp, defense, res): Entity.__init__(self, name, pos, sprite) self.hp_max = hp self.hp = hp self.defense = defense self.res = res
def __init__(self, name, pos, sprite, interaction=None): Entity.__init__(self, name, pos, sprite) self.sprite_name = sprite self.interaction = interaction