walls now properly get destoryed

This commit is contained in:
Simon Kellet 2024-07-22 23:28:53 +01:00
parent ff40a5507b
commit 2cd9f263e6

View File

@ -2,12 +2,10 @@
-- all objects
-- Used in map switching and restarting!
function ClearWalls()
for w in pairs(Walls) do
Walls[w] = nil
function ClearWalls(walls)
for i = #walls, 1, -1 do
walls[i]:destroy()
end
Walls = {}
end
function StopAllMusic()
@ -43,7 +41,7 @@ function RestartGame()
ClearBullets(Bullets2)
--Clear Walls
--ClearWalls()
ClearWalls(Walls)
-- Done!
end