diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed8ebf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ \ No newline at end of file diff --git a/agent.py b/agent.py new file mode 100644 index 0000000..63d3450 --- /dev/null +++ b/agent.py @@ -0,0 +1,15 @@ +import pygame.image + + +class trashmaster(pygame.sprite.Sprite): + def __init__(self): + super().__init__() + + + self.images = [] + self.image = pygame.image.load("resources/textures/trashmaster_blu.png") + self.image = pygame.transform.scale(self.image, (16, 16)) + self.images.append(self.image) + self.rect = self.image.get_rect() + + garbagetruck_list = pygame.sprite.Group() diff --git a/main.py b/main.py index e9caf81..96a18ce 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,8 @@ import pygame from map import preparedMap +from agent import trashmaster + +pygame.init() #config SCREEN_SIZE = [512, 512] @@ -22,12 +25,18 @@ if __name__ == '__main__': # update okna pygame.display.update() - # event loop - running = True - while running: - for event in pygame.event.get(): - if event.type == pygame.QUIT: - running = False +smieciara1 = trashmaster() +smieciara_list = pygame.sprite.Group() +smieciara_list.add(smieciara1) +smieciara_list.draw(screen) - # end - pygame.quit() \ No newline at end of file +pygame.display.update() + +running = True +while running: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + + +pygame.quit() diff --git a/resources/textures/trashmaster_blu.png b/resources/textures/trashmaster_blu.png new file mode 100644 index 0000000..4a0950b Binary files /dev/null and b/resources/textures/trashmaster_blu.png differ diff --git a/resources/textures/trashmaster_orange.png b/resources/textures/trashmaster_orange.png new file mode 100644 index 0000000..777b7f6 Binary files /dev/null and b/resources/textures/trashmaster_orange.png differ