2023-03-11 12:14:30 +01:00
|
|
|
import pygame
|
|
|
|
|
2023-03-07 13:00:35 +01:00
|
|
|
class Tractor:
|
|
|
|
#this is where tractor spawns when program starts (center)
|
|
|
|
x=500
|
|
|
|
y=500
|
|
|
|
#it's speed -> pixels it moves after pressing arrow
|
|
|
|
speed = 10
|
|
|
|
#it's size
|
|
|
|
width = 20
|
|
|
|
height = 20
|
2023-03-11 12:14:30 +01:00
|
|
|
|
|
|
|
#tractor image rotation
|
|
|
|
ROTATION_IMG = pygame.image.load('assets/tractor/tractor_UP.png')
|
|
|
|
UP = pygame.image.load('assets/tractor/tractor_UP.png')
|
|
|
|
DOWN = pygame.image.load('assets/tractor/tractor_DOWN.png')
|
|
|
|
LEFT = pygame.image.load('assets/tractor/tractor_LEFT.png')
|
|
|
|
RIGHT = pygame.image.load('assets/tractor/tractor_RIGHT.png')
|
|
|
|
|