import pygame

#klasa pomocnicza 
class obraz(pygame.sprite.Sprite):
    def __init__(self, sciezka):
        super().__init__()
        self.obraz = pygame.image.load(sciezka)

#klasa bazowa
class Element():
    def __init__(self, typ):
        #wskaznik wybranego elementu ubioru 
        self.wybrany = 0
        #Lista obrazkow danego typu
        self.lista_obrazkow = []
        
        for i in range(1, 4):
            sciezka = f"images/{typ}{i}.png"
            wczytany_obraz = obraz(sciezka)
            self.lista_obrazkow.append(wczytany_obraz)
        pass


    def wybierzNastepny(self):
        self.wybrany += 1
        if  self.wybraby > 2:
            self.wybrany = 0
    
    def wybranyObraz(self):
       return self.lista_obrazkow[self.wybrany].obraz


class NakrycieGlowy(Element):
    def __init__(self):
        super().__init__("head")

class Ubranie(Element):
    def __init__(self):
        super().__init__("body")


class oczy(Element):
    def __init__(self):
        super().__init__("eye")


class bron(Element):
    def __init__(self):
        super().__init__("weapon")


