diff --git a/bundle/main.lua b/bundle/main.lua index a4ea5a1..d9cc55e 100644 --- a/bundle/main.lua +++ b/bundle/main.lua @@ -293,6 +293,17 @@ function love.update(dt) end end +function explodeAllReflected() + for _, missile in ipairs(missiles) do + if missile.reflected then + spawnExplosion(missile.x, missile.y) + -- Freeze the missile + missile.dx = 0 + missile.dy = 0 + end + end +end + function movePaddle(screen_x) paddle_x = fromScreenCoordinate(screen_x, 0) paddle_x = math.max(paddle_x, paddle_width/2 + wall_thickness) @@ -302,6 +313,8 @@ end love.mousemoved = movePaddle +love.mousepressed = explodeAllReflected + love.resize = setScreenDimensions function drawWalls()