Allow some tweens to run even after game over
parent
61b08d5293
commit
e84feb42fb
46
main.lua
46
main.lua
|
|
@ -454,29 +454,6 @@ function love.update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if game.paused or game.game_over then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if game.show_aim_guide then
|
|
||||||
for i = 1, #game.aim_guide do
|
|
||||||
local dot = game.aim_guide[i]
|
|
||||||
if dot.tween then
|
|
||||||
if dot.tween.delay == 0 then
|
|
||||||
dot.tween.t = dot.tween.t + 1
|
|
||||||
if dot.tween.t == dot.tween.d then
|
|
||||||
dot.tween.t = 0
|
|
||||||
else
|
|
||||||
dot.x = easing.linear(dot.tween.t, dot.tween.b_x, dot.tween.c_x, dot.tween.d)
|
|
||||||
dot.y = easing.linear(dot.tween.t, dot.tween.b_y, dot.tween.c_y, dot.tween.d)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
dot.tween.delay = dot.tween.delay - 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if game.current_bubble and game.current_bubble.tween then
|
if game.current_bubble and game.current_bubble.tween then
|
||||||
game.current_bubble.tween.t = game.current_bubble.tween.t + 1
|
game.current_bubble.tween.t = game.current_bubble.tween.t + 1
|
||||||
if game.current_bubble.tween.t == game.current_bubble.tween.d then
|
if game.current_bubble.tween.t == game.current_bubble.tween.d then
|
||||||
|
|
@ -507,6 +484,29 @@ function love.update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if game.paused or game.game_over then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if game.show_aim_guide then
|
||||||
|
for i = 1, #game.aim_guide do
|
||||||
|
local dot = game.aim_guide[i]
|
||||||
|
if dot.tween then
|
||||||
|
if dot.tween.delay == 0 then
|
||||||
|
dot.tween.t = dot.tween.t + 1
|
||||||
|
if dot.tween.t == dot.tween.d then
|
||||||
|
dot.tween.t = 0
|
||||||
|
else
|
||||||
|
dot.x = easing.linear(dot.tween.t, dot.tween.b_x, dot.tween.c_x, dot.tween.d)
|
||||||
|
dot.y = easing.linear(dot.tween.t, dot.tween.b_y, dot.tween.c_y, dot.tween.d)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
dot.tween.delay = dot.tween.delay - 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if game.ceiling_drop_tween then
|
if game.ceiling_drop_tween then
|
||||||
local old_y = game.ceiling_bottom
|
local old_y = game.ceiling_bottom
|
||||||
game.ceiling_drop_tween.t = game.ceiling_drop_tween.t + 1
|
game.ceiling_drop_tween.t = game.ceiling_drop_tween.t + 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue