diff --git a/towers/archerTower.py b/towers/archerTower.py index 98a33fb..2a1d00b 100644 --- a/towers/archerTower.py +++ b/towers/archerTower.py @@ -4,11 +4,9 @@ import math from menu.menu import Menu - menu_bg = pygame.transform.scale(pygame.image.load(os.path.join("game_assets", "menu.png")).convert_alpha(), (120, 70)) upgrade_btn = pygame.transform.scale(pygame.image.load(os.path.join("game_assets", "upgrade.png")).convert_alpha(), (50, 50)) - tower_imgs1 = [] archer_imgs1 = [] # load archer tower images @@ -22,7 +20,6 @@ archer_imgs1.append( pygame.image.load(os.path.join("game_assets/archer_towers/archer_top", str(x) + ".png")).convert_alpha()) - class ArcherTowerLong(Tower): def __init__(self, x,y): super().__init__(x, y) @@ -38,7 +35,6 @@ def __init__(self, x,y): self.width = self.height = 90 self.moving = False self.name = "archer" - self.menu = Menu(self, self.x, self.y, menu_bg, [2000, 5000,"MAX"]) self.menu.add_btn(upgrade_btn, "Upgrade") @@ -117,8 +113,7 @@ def attack(self, enemies): self.archer_imgs[x] = pygame.transform.flip(img, True, False) return money - - + tower_imgs = [] archer_imgs = [] # load archer tower images @@ -126,13 +121,12 @@ def attack(self, enemies): tower_imgs.append(pygame.transform.scale( pygame.image.load(os.path.join("game_assets/archer_towers/archer_2", str(x) + ".png")), (90, 90))) - + # load archer images for x in range(43,49): archer_imgs.append( pygame.image.load(os.path.join("game_assets/archer_towers/archer_top_2", str(x) + ".png"))) - class ArcherTowerShort(ArcherTowerLong): def __init__(self, x,y): super().__init__(x, y) @@ -145,10 +139,6 @@ def __init__(self, x,y): self.left = True self.damage = 2 self.original_damage = self.damage - self.menu = Menu(self, self.x, self.y, menu_bg, [2500, 5500, "MAX"]) self.menu.add_btn(upgrade_btn, "Upgrade") self.name = "archer2" - - -