Használt szobor eltüntetése

This commit is contained in:
markojozsef
2026-10-17 11:37:15 +02:00
parent 8a87439884
commit b40182dbf2
2 changed files with 3 additions and 2 deletions

View File

@@ -114,7 +114,7 @@ def update(game, dt):
for o in objects: for o in objects:
if o.interactive and aabb_check(*int_aabb, *o.get_aabb()): 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 if controls.is_control_pressed(0): # Fel
balthasar.set_direction(DIR_UP) balthasar.set_direction(DIR_UP)

View File

@@ -197,5 +197,6 @@ class BattlePodium:
pixelated=True pixelated=True
) )
def on_interact(self, start_battle_func): def on_interact(self, start_battle_func, delete_obj_func):
start_battle_func(self.battle) start_battle_func(self.battle)
delete_obj_func(self)