2ce075c29f
Signed-off-by: Neerka <kuba.markil0220@gmail.com>
32 lines
858 B
Python
32 lines
858 B
Python
from generators import *
|
|
|
|
W = 30
|
|
H = 20
|
|
MULT = 48
|
|
SIZE = (MULT*W, MULT*H)
|
|
pygame.init()
|
|
screen = pygame.display.set_mode(SIZE)
|
|
tilemap = Tilemap(Tileset("sprites/Tiles/1 Tiles/FieldsTile_38.png", mult=MULT), mult=MULT, size=(W, H))
|
|
|
|
trashcans = trashcanGenerator(MULT)
|
|
houses = householdGenerator(MULT)
|
|
garbagetruck = Garbagetruck(MULT).setHouses(houses).setTrashcans(trashcans)
|
|
|
|
running = True
|
|
while running:
|
|
for event in pygame.event.get():
|
|
if event.type == pygame.QUIT:
|
|
running = False
|
|
|
|
screen.fill((0, 0, 0))
|
|
tilemap.render(MULT)
|
|
screen.blit(tilemap.image, tilemap.rect)
|
|
screen.blit(garbagetruck.getImage(), garbagetruck.printme())
|
|
for i in trashcans:
|
|
screen.blit(i.getImage(), i.printme())
|
|
for h in houses:
|
|
screen.blit(h.getImage(), h.printme())
|
|
pygame.display.update()
|
|
|
|
pygame.quit()
|