From a51661ae6e0a4d5893af9c4be01e5d91120f16a1 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Wed, 13 May 2020 19:45:52 +0200 Subject: [PATCH] on_interaction method now removes the entity itself --- src/entities/Pickupable.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/entities/Pickupable.py b/src/entities/Pickupable.py index bf4cc5e..54a9c99 100644 --- a/src/entities/Pickupable.py +++ b/src/entities/Pickupable.py @@ -6,3 +6,6 @@ class Pickupable(Interactable): super().__init__(texture, size, pos, Statistics) self.is_pickupable = True + def on_interaction(self, Player): + super(Pickupable, self).on_interaction(Player) + self.kill()