aboutsummaryrefslogtreecommitdiff
path: root/update.lua
diff options
context:
space:
mode:
authorRibbonCable <ambiguousmachine@gmail.com>2022-02-18 00:12:11 -0800
committerRibbonCable <ambiguousmachine@gmail.com>2022-02-18 00:12:11 -0800
commit5fae28bcec05bebef0aa9ccc11c827b1aa9f3a7d (patch)
tree80d86d3ac5d9a4f0e3855d829f0312de2adf1367 /update.lua
parentb15a0c077587ddf748d34556524416435c01ec17 (diff)
Moved screenshake math into vars to reduce ~20 tokens.
Diffstat (limited to 'update.lua')
-rw-r--r--update.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/update.lua b/update.lua
index e006ed6..4bcd037 100644
--- a/update.lua
+++ b/update.lua
@@ -4,6 +4,8 @@ respawntimer -= ft
flashtime = ceil(t()*10%2) --for flashing elements (ship, score)
circletimex = sin(t())*3 -- for elements that move in a circle (respawn timer)
circletimey = cos(t())*3
+screenshakex = sin(shake+t())*shake
+screenshakey = sin(shake+gt/2.1)*shake
if gameover then
scrollspeed = mid(-1/10,scrollspeed-1/3000,ft)