Projekt_Si/classes/table.py
2024-04-15 22:39:31 +02:00

19 lines
598 B
Python

from classes.interactable import Interactable
import pygame
import prefs
from classes.agent import Agent
class Table(Interactable):
def __init__(self, cell, name, sprite="sprites/table.png"):
super().__init__(cell, sprite)
self.sprite = pygame.image.load(sprite).convert_alpha()
self.sprite = pygame.transform.scale(self.sprite, (prefs.CELL_SIZE, prefs.CELL_SIZE))
cell.blocking_movement = True
self.name = name
def interact(self,agent):
if not isinstance(agent, Agent):
print("Agent must be of type Agent")
return