summaryrefslogtreecommitdiff
path: root/dyl.lua
diff options
context:
space:
mode:
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)