From b40182dbf2383930bb4a6da396055185d1812838 Mon Sep 17 00:00:00 2001 From: markojozsef Date: Sat, 17 Oct 2026 11:37:15 +0200 Subject: [PATCH] =?UTF-8?q?Haszn=C3=A1lt=20szobor=20elt=C3=BCntet=C3=A9se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gamestates/overworld.py | 2 +- src/objects.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gamestates/overworld.py b/src/gamestates/overworld.py index b42a32b..f629b76 100644 --- a/src/gamestates/overworld.py +++ b/src/gamestates/overworld.py @@ -114,7 +114,7 @@ def update(game, dt): for o in objects: if o.interactive and aabb_check(*int_aabb, *o.get_aabb()): - o.on_interact(start_battle) + o.on_interact(start_battle, lambda o: objects.remove(o)) if controls.is_control_pressed(0): # Fel balthasar.set_direction(DIR_UP) diff --git a/src/objects.py b/src/objects.py index 6f90d42..1225d51 100644 --- a/src/objects.py +++ b/src/objects.py @@ -197,5 +197,6 @@ class BattlePodium: pixelated=True ) - def on_interact(self, start_battle_func): + def on_interact(self, start_battle_func, delete_obj_func): start_battle_func(self.battle) + delete_obj_func(self)