From e51b2ab9998588d2c4c842d861806c81011d751b Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sat, 9 May 2026 20:18:45 -0700 Subject: Interpolates camera movement --- dyl.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'dyl.lua') 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) -- cgit v1.3