Update 'board'
This commit is contained in:
parent
df74ab523d
commit
2467b77adc
11
board
11
board
@ -35,11 +35,14 @@ def draw(square_num, objectArr):
|
|||||||
## tutaj rysujemy agenta i inne obiekty juz na gotowej mapie
|
## tutaj rysujemy agenta i inne obiekty juz na gotowej mapie
|
||||||
|
|
||||||
## RYSUJEMY AGENTA
|
## RYSUJEMY AGENTA
|
||||||
agent_color = (255, 0, 0)
|
#agent_color = (255, 0, 0)
|
||||||
circleX = objectArr[0].xPos * square + square / 2
|
circleX = objectArr[0].xPos * square + square + square/ 2 #dodane jedno +square, by śmieciara nie wychodziła poza kratę
|
||||||
circleY = objectArr[0].yPos * square - square / 2
|
circleY = objectArr[0].yPos * square - square / 2
|
||||||
radius = 10
|
#radius = 10
|
||||||
pygame.draw.circle(screen, agent_color, (a + circleX, b + circleY), radius)
|
#pygame.draw.circle(screen, agent_color, (a + circleX, b + circleY), radius)
|
||||||
|
truck = pygame.image.load("C:/Users/gabi9/Downloads/car.png.png").convert_alpha() #tu ścieżka do zdjęcia w tle
|
||||||
|
truck = pygame.transform.scale(truck, (square, square))
|
||||||
|
screen.blit(truck, (circleX, circleY))
|
||||||
|
|
||||||
def kb_listen(objectArray, gridLength):
|
def kb_listen(objectArray, gridLength):
|
||||||
for event in pygame.event.get():
|
for event in pygame.event.get():
|
||||||
|
Loading…
Reference in New Issue
Block a user