summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-03-11 10:09:32 +0800
committerEltrac <hi@guhub.cn>2025-03-11 10:09:32 +0800
commit8b69034db039c03a007a04bbc5bac58d426058c2 (patch)
treeda37e092d8d56355a09ac2116ce95e1c92c4c703 /main.lua
parent7a5baa796e77229a49969241f790492e87aa087d (diff)
refactor: object updates itself with :update() function
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 31b5982..ef8135c 100644
--- a/main.lua
+++ b/main.lua
@@ -52,11 +52,13 @@ end
local controller = require "logic.controller"
function love.update(dt)
- local updates = { player, enemies, bullets, loot, map, controller, speaker }
+ local updates = { player, map, controller, speaker }
for _, entity in ipairs(updates) do
entity.update(dt)
end
+ G.currentRoom:update(dt)
+
if not G.player:isAlive() then
initGame()
end