diff --git a/src/entities/Npc.py b/src/entities/Npc.py index 5867cac..ac81f0b 100644 --- a/src/entities/Npc.py +++ b/src/entities/Npc.py @@ -1,10 +1,8 @@ -from src.entities.Collidable import Collidable from src.entities.Interactable import Interactable -class Npc(Collidable, Interactable): +class Npc(Interactable): def __init__(self, texture, pos, id, path, speed): - Collidable.__init__(self, texture, pos, id) Interactable.__init__(self, texture, pos, id) self.path = path self.speed = speed diff --git a/src/entities/Pickupable.py b/src/entities/Pickupable.py index cb7e7d6..319daa1 100644 --- a/src/entities/Pickupable.py +++ b/src/entities/Pickupable.py @@ -1,16 +1,17 @@ import src.entities.Interactable as Interactable from src.entities import Statistics, Player - +from game.MapNew import Map class Pickupable(Interactable): - def __init__(self, texture, pos, id): + def __init__(self, texture, pos, id, Statistics): super().__init__(texture, pos, id) self.is_pickupable = True + self.Statistics = Statistics - def on_pickup(self, Player, Statistics): - Player.statistics.set_hp(Statistics.hp) - Player.statistics.set_stamina(Statistics.stamina) - Player.statistics.set_thirst(Statistics.thirst) - Player.statistics.set_hunger(Statistics.hunger) + def on_pickup(self, Player): + Player.statistics.set_hp(self.Statistics.hp) + Player.statistics.set_stamina(self.Statistics.stamina) + Player.statistics.set_thirst(self.Statistics.thirst) + Player.statistics.set_hunger(self.Statistics.hunger) - # TODO delete pickupable object from map + Map.removeSpriteFromMap(self)