import pygame

#klasa pomocnicza Obraz
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):
        #wskaźnik wybranego elementu ubioru
        self.wybrany = 0
        #lista obrazów
        self.lista_obrazow = []
        for i in range(1, 4):
            sciezka = f'images/{typ}{i}.png'
            wczytany_obraz = Obraz(sciezka)
            self.lista_obrazow.append(wczytany_obraz)
        pass

    def wybierzNastepny(self):
        self.wybrany += 1
        if self.wybrany > 2:
            self.wybrany = 0

    def wybranyObraz(self):
        return self.lista_obrazow[self.wybrany].obraz
    
#Klasa NakrycieGlowyElement
class NakrycieGlowyElement(Element):
    def __init__(self):
        super().__init__('head')

#Klasa UbranieElement
class UbranieElement(Element):
    def __init__(self):
        super().__init__('body')
#Klasa OczyElement
class OczyElement(Element):
    def __init__(self):
        super().__init__('eye')
#Klasa BronElement
class BronElement(Element):
    def __init__(self):
        super().__init__('weapon')