agent_model
This commit is contained in:
parent
70e4b7ba69
commit
b701bebf83
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
__pycache__
|
15
agent.py
Normal file
15
agent.py
Normal file
@ -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()
|
14
main.py
14
main.py
@ -1,4 +1,9 @@
|
||||
import pygame
|
||||
|
||||
from agent import trashmaster
|
||||
|
||||
|
||||
|
||||
pygame.init()
|
||||
|
||||
pygame.display.set_caption('Wall-e')
|
||||
@ -12,12 +17,19 @@ tileImage = pygame.image.load('tile1.png')
|
||||
surfaceSize = width, height = (512, 512)
|
||||
surface = pygame.Surface(surfaceSize)
|
||||
|
||||
|
||||
|
||||
for x in range(0, 512, 16):
|
||||
for y in range(0, 512, 16):
|
||||
surface.blit(tileImage, (x, y))
|
||||
|
||||
screen.blit(surface, (0,0))
|
||||
|
||||
smieciara1 = trashmaster()
|
||||
smieciara_list = pygame.sprite.Group()
|
||||
smieciara_list.add(smieciara1)
|
||||
smieciara_list.draw(screen)
|
||||
|
||||
pygame.display.update()
|
||||
|
||||
running = True
|
||||
@ -28,5 +40,3 @@ while running:
|
||||
|
||||
|
||||
pygame.quit()
|
||||
|
||||
# test push
|
BIN
resources/textures/trashmaster_blu.png
Normal file
BIN
resources/textures/trashmaster_blu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.0 KiB |
BIN
resources/textures/trashmaster_orange.png
Normal file
BIN
resources/textures/trashmaster_orange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
Loading…
Reference in New Issue
Block a user