destroy rather than kill game objects

This commit is contained in:
yuki 2025-11-12 01:02:57 -03:00
parent 8a8e5c43ea
commit 3b83851fb9

View file

@ -40,7 +40,8 @@ function Area:destroy()
end end
for i = #self.game_objects, 1, -1 do for i = #self.game_objects, 1, -1 do
local game_object = self.game_objects[i] local game_object = self.game_objects[i]
game_object:kill() ---@diagnostic disable-next-line: invisible
game_object:destroy()
table.remove(self.game_objects, i) table.remove(self.game_objects, i)
end end
self.game_objects = {} self.game_objects = {}