diff --git a/.idea/Sztuczna_Inteligencja_Gr16.iml b/.idea/Sztuczna_Inteligencja_Gr16.iml index f754d4e..4335812 100644 --- a/.idea/Sztuczna_Inteligencja_Gr16.iml +++ b/.idea/Sztuczna_Inteligencja_Gr16.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 89fb180..0a4fd2a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/Ikony/test1_ikona.png b/Ikony/test1_ikona.png index 259cfb1..8786166 100644 Binary files a/Ikony/test1_ikona.png and b/Ikony/test1_ikona.png differ diff --git a/Ikony/test2_ikona.png b/Ikony/test2_ikona.png new file mode 100644 index 0000000..d7136da Binary files /dev/null and b/Ikony/test2_ikona.png differ diff --git a/agent.py b/agent.py index 74c2c3d..036502d 100644 --- a/agent.py +++ b/agent.py @@ -175,9 +175,11 @@ class Agent(Obserwowany): def obrocSieWLewo(self): self.kierunek = self.kierunek.kierunekNaLewo() + self.tekstura = pygame.transform.rotate(self.tekstura, 90) def obrocSieWPrawo(self): self.kierunek = self.kierunek.kierunekNaPrawo() + self.tekstura = pygame.transform.rotate(self.tekstura, 270) def narysujAgenta(self): self.krata.okno.blit(self.tekstura, (self.hitbox.x, self.hitbox.y)) diff --git a/main.py b/main.py index 601942c..d3df40d 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,7 @@ import os +import pygame.transform + from agent import * from okno import * from ramy_czyli_wiedza_agenta import * @@ -18,7 +20,7 @@ def dodaj_agenta(): # random.randint(0, LICZBA_POL_W_POZIOMIE - BOK_AGENTA1_W_POLACH)) # pole_lewe_gorne = PoleKraty(krata_magazynu, LICZBA_POL_W_PIONIE - BOK_AGENTA1_W_POLACH, int(LICZBA_POL_W_POZIOMIE / 2)) pole_lewe_gorne = PoleKraty(krata_magazynu, 0, 0) - pom = 'traktor_ikona.png' + pom = 'test2_ikona.png' ikona = pygame.transform.scale(pygame.image.load(os.path.join('Ikony', pom)), (BOK_AGENTA1, BOK_AGENTA1)) Agent(krata_magazynu, pole_lewe_gorne, ikona)