Interactable entities now have classification field

This commit is contained in:
Marcin Kostrzewski 2020-05-16 09:48:42 +02:00
parent d27986045d
commit 8c3bdc3726

View File

@ -2,7 +2,7 @@ from src.entities.Entity import Entity
class Interactable(Entity):
def __init__(self, texture, size, pos, Statistics):
def __init__(self, texture, size, pos, Statistics, classifier=None):
"""
Create an interactable entity, that can be interacted with.
@ -10,10 +10,13 @@ class Interactable(Entity):
:param size: Size in px
:param pos: A tuple of coords (x,y)
:param Statistics: Outcome of the interaction
:param classifier: Type of the entity (food, water, rest)
"""
super().__init__(texture, size, pos)
self.Statistics = Statistics
self.classifier = classifier
def on_interaction(self, Player):
"""
Applies outcome to the Player