19 lines
760 B
Python
19 lines
760 B
Python
import pygame
|
|
from Field import Field
|
|
from Global_variables import Global_variables as G_var
|
|
from Package_types import Package_types
|
|
from Types_colors import Types_colors
|
|
|
|
|
|
class Shelf(Field):
|
|
def __init__(self, window, x, y, type):
|
|
Field.__init__(self, window, x, y)
|
|
self.type = type
|
|
self.color = Types_colors.get_shelf_color(type)
|
|
self.rect = pygame.Rect(self.x * G_var().RECT_SIZE, self.y *
|
|
G_var().RECT_SIZE, G_var().RECT_SIZE, G_var().RECT_SIZE)
|
|
|
|
def draw(self):
|
|
self.rect = pygame.Rect(self.x * G_var().RECT_SIZE, self.y *
|
|
G_var().RECT_SIZE, G_var().RECT_SIZE, G_var().RECT_SIZE)
|
|
pygame.draw.rect(self.window, self.color, self.rect) |