updated graphics

This commit is contained in:
Łukasz 2021-03-29 21:46:40 +02:00
parent 41272aea6e
commit e2c69cd3b9
12 changed files with 16 additions and 27 deletions

View File

@ -5,11 +5,11 @@ import pygame
def drawUI(board, display, tractor, direction, tillageUnit, field):
for i in range(1, 21):
display.fill(WHITE)
makeField(board, display)
drawTractor(display, tractor.horizontal_index, tractor.vertical_index, direction, i)
drawTractor(display, tractor.horizontal_index, tractor.vertical_index, direction)
drawInfo(display, tractor, tillageUnit, field)
pygame.display.update()
@ -57,25 +57,14 @@ def makeField(board, screen: pygame.Surface):
screen.blit(to_fertilizer, to_fertilizer_rect)
def drawTractor(screen: pygame.Surface, tractor_horizontal_index, tractor_vertical_index, direction, i):
tractor_pic = tractor_up
horizontal = tractor_horizontal_index * TILE_SIZE
vertical = tractor_vertical_index * TILE_SIZE
i = i/10
def drawTractor(screen: pygame.Surface, tractor_horizontal_index, tractor_vertical_index, direction):
if direction == "UP":
tractor_pic = tractor_up
vertical = vertical + (TILE_SIZE * i)
if direction == "DOWN":
tractor_pic = tractor_down
vertical = vertical - (TILE_SIZE * i)
if direction == "LEFT":
tractor_pic = tractor_left
horizontal = horizontal + (TILE_SIZE * i)
if direction == "RIGHT":
tractor_pic = tractor_right
horizontal = horizontal - (TILE_SIZE * i)
screen.blit(tractor_pic, (horizontal, vertical))
screen.blit(tractor_up, (tractor_horizontal_index * TILE_SIZE, tractor_vertical_index * TILE_SIZE))
elif direction == "DOWN":
screen.blit(tractor_down, (tractor_horizontal_index * TILE_SIZE, tractor_vertical_index * TILE_SIZE))
elif direction == "LEFT":
screen.blit(tractor_left, (tractor_horizontal_index * TILE_SIZE, tractor_vertical_index * TILE_SIZE))
elif direction == "RIGHT":
screen.blit(tractor_right, (tractor_horizontal_index * TILE_SIZE, tractor_vertical_index * TILE_SIZE))
else:
screen.blit(tractor_right, (tractor_horizontal_index * TILE_SIZE, tractor_vertical_index * TILE_SIZE))

BIN
resources/fuel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
resources/to_cut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
resources/to_fertilizer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
resources/to_plow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
resources/to_seed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
resources/to_water.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
resources/tools.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
resources/tractor_down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
resources/tractor_left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
resources/tractor_right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
resources/tractor_up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB