AIprojekt-wozek/Truck.py

16 lines
455 B
Python
Raw Normal View History

2022-03-24 20:02:21 +01:00
import pygame
from Field import Field
from Global_variables import Global_variables as G_var
2022-03-24 20:02:21 +01:00
class Truck(Field):
def __init__(self, window, x, y):
Field.__init__(self, window, x, y)
2022-03-24 20:02:21 +01:00
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))