aboutsummaryrefslogtreecommitdiff
path: root/update.lua
diff options
context:
space:
mode:
authorChris Bradley <1029chris@gmail.com>2022-02-19 16:29:52 -0800
committerChris Bradley <1029chris@gmail.com>2022-02-19 16:29:52 -0800
commit5bfa4bdc01f19c019e5a8b8e0ac10511d3beaef3 (patch)
treec61ce9bb30aeb0f2771111af3c9e1b3b979a0fc7 /update.lua
parent5ca492d316e5e37edb4054809ca3f18e055bd256 (diff)
Could you spare 6 tokens??
ALMOST DONE!!!!!!!!!! JUST NEED A COUPLE MORE TOKEEEEENSSS!!!!!!!!!!!!!!!!!!!!!!!
Diffstat (limited to 'update.lua')
-rw-r--r--update.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/update.lua b/update.lua
index cbd7e06..cfaddab 100644
--- a/update.lua
+++ b/update.lua
@@ -8,7 +8,7 @@ screenshakex = sin(shake+t())*shake
screenshakey = sin(shake+gt/2.1)*shake
if gameover then
- scrollspeed = mid(-1/10,scrollspeed-1/3000,ft)
+ scrollspeed = lerp(scrollspeed, -1/22, 0.01) -- scroll backwards
currentscore = 0 --depleats score
if respawntimer < 0 then
gameover = false
@@ -18,7 +18,11 @@ if gameover then
end
elseif gamerunning then
updatewaves() -- update the wave function
- scrollspeed = mid(0,scrollspeed+1/2000,ft)
+ local targetspeed = ft
+ if bossmusic then
+ targetspeed /= 2 --half scroll speed when boss
+ end
+ scrollspeed = lerp(scrollspeed, targetspeed, 0.03)
end
gt += scrollspeed + 1/600