Allow exploding all reflected missiles
This commit is contained in:
parent
cc73f371a5
commit
891e37fa4f
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue