AIprojekt-wozek/Truck.py

16 lines
455 B
Python

import pygame
from Field import Field
from Global_variables import Global_variables as G_var
class Truck(Field):
def __init__(self, window, x, y):
Field.__init__(self, window, x, y)
self.image = pygame.image.load("resources/truck.jpeg").convert()
self.has_package = False
# drawing the truck
def draw(self):
self.window.blit(
self.image, (self.x * G_var().RECT_SIZE, self.y * G_var().RECT_SIZE))