summaryrefslogtreecommitdiff
path: root/dyl.lua
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-05-09 20:18:45 -0700
committerElizabeth Alexander Hunt <me@liz.coffee>2026-05-09 20:18:45 -0700
commite51b2ab9998588d2c4c842d861806c81011d751b (patch)
tree4a981560c359f2c255a8a5111b91b37a449c9e5a /dyl.lua
parenteb9466c8d3d18d65eb4bab2f6770f55cba9d8de3 (diff)
downloaddyl8-e51b2ab9998588d2c4c842d861806c81011d751b.tar.gz
dyl8-e51b2ab9998588d2c4c842d861806c81011d751b.zip
Interpolates camera movement
Diffstat (limited to 'dyl.lua')
-rw-r--r--dyl.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/dyl.lua b/dyl.lua
index fa0190d..a1174a9 100644
--- a/dyl.lua
+++ b/dyl.lua
@@ -234,6 +234,14 @@ end
_camera = Camera:new(_player)
_step_t = time()
+_continue = true
+function pause()
+ _continue = false
+end
+function resume()
+ _continue = true
+ _step_t = time()
+end
function _update60()
-- clear here in case we want to print to screen outside of _draw
cls(0)
@@ -245,6 +253,8 @@ function _update60()
foreach(update_hooks, function(f) f(step_dt) end)
handle_input()
+
+ if not _continue then return end
World.foreach(function(e) e:update(step_dt) end)
run_collisions()
@@ -252,6 +262,7 @@ function _update60()
World.cull_the_dead()
end
+
function _draw()
-- TODO: FIX THIS
-- World.sort(function(a, b)