feat: add new sprites & direction to tractor
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 5.9 KiB |
BIN
src/images/tractor/east.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/images/tractor/north.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src/images/tractor/south.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/tractor/west.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
@ -9,10 +9,12 @@ class Tractor(pygame.sprite.Sprite):
|
|||||||
super().__init__
|
super().__init__
|
||||||
self.field = field
|
self.field = field
|
||||||
|
|
||||||
self.image = pygame.image.load('images/tractor.png').convert_alpha()
|
self.image = pygame.image.load('images/tractor/east.png').convert_alpha()
|
||||||
self.image = pygame.transform.scale(self.image, (TILE_SIZE, TILE_SIZE))
|
self.image = pygame.transform.scale(self.image, (TILE_SIZE, TILE_SIZE))
|
||||||
self.rect = self.image.get_rect()
|
self.rect = self.image.get_rect()
|
||||||
|
|
||||||
|
self.direction = 'east'
|
||||||
|
|
||||||
x, y = 0, 0
|
x, y = 0, 0
|
||||||
self.rect.topleft = (x, y)
|
self.rect.topleft = (x, y)
|
||||||
|
|
||||||
|