Interactable entities now have classification field
This commit is contained in:
parent
d27986045d
commit
8c3bdc3726
@ -2,7 +2,7 @@ from src.entities.Entity import Entity
|
|||||||
|
|
||||||
|
|
||||||
class Interactable(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.
|
Create an interactable entity, that can be interacted with.
|
||||||
|
|
||||||
@ -10,10 +10,13 @@ class Interactable(Entity):
|
|||||||
:param size: Size in px
|
:param size: Size in px
|
||||||
:param pos: A tuple of coords (x,y)
|
:param pos: A tuple of coords (x,y)
|
||||||
:param Statistics: Outcome of the interaction
|
:param Statistics: Outcome of the interaction
|
||||||
|
:param classifier: Type of the entity (food, water, rest)
|
||||||
"""
|
"""
|
||||||
super().__init__(texture, size, pos)
|
super().__init__(texture, size, pos)
|
||||||
self.Statistics = Statistics
|
self.Statistics = Statistics
|
||||||
|
|
||||||
|
self.classifier = classifier
|
||||||
|
|
||||||
def on_interaction(self, Player):
|
def on_interaction(self, Player):
|
||||||
"""
|
"""
|
||||||
Applies outcome to the Player
|
Applies outcome to the Player
|
||||||
|
Loading…
Reference in New Issue
Block a user