Használt szobor eltüntetése
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user