Change delays to be in frames, not seconds

main
Tyler Scott 2022-02-09 23:17:59 +07:00
parent 6fe70e7b57
commit 2ed5c40518
1 changed files with 3 additions and 3 deletions

View File

@ -453,7 +453,7 @@ function love.update(dt)
for i = 1, #matches do for i = 1, #matches do
local index = matches[i] local index = matches[i]
game.bursting_bubbles[#game.bursting_bubbles+1] = { game.bursting_bubbles[#game.bursting_bubbles+1] = {
delay = (i - 1) / 40, delay = (i - 1) * 5,
x = game.bubble_slots[index].x, x = game.bubble_slots[index].x,
y = game.bubble_slots[index].y, y = game.bubble_slots[index].y,
bubble_type = game.bubble_slots[index].bubble_type, bubble_type = game.bubble_slots[index].bubble_type,
@ -538,14 +538,14 @@ function love.update(dt)
if #game.bursting_bubbles > 0 then if #game.bursting_bubbles > 0 then
for i = #game.bursting_bubbles, 1, -1 do for i = #game.bursting_bubbles, 1, -1 do
local bubble = game.bursting_bubbles[i] local bubble = game.bursting_bubbles[i]
if bubble.delay <= 0 then if bubble.delay == 0 then
bubble.scale = bubble.scale * 1.03 bubble.scale = bubble.scale * 1.03
bubble.alpha = bubble.alpha - 0.02 bubble.alpha = bubble.alpha - 0.02
if bubble.scale >= 1.5 then if bubble.scale >= 1.5 then
table.remove(game.bursting_bubbles, i) table.remove(game.bursting_bubbles, i)
end end
else else
bubble.delay = bubble.delay - dt bubble.delay = bubble.delay - 1
end end
end end
end end