diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-11 10:09:32 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-11 10:09:32 +0800 |
| commit | 8b69034db039c03a007a04bbc5bac58d426058c2 (patch) | |
| tree | da37e092d8d56355a09ac2116ce95e1c92c4c703 /main.lua | |
| parent | 7a5baa796e77229a49969241f790492e87aa087d (diff) | |
refactor: object updates itself with :update() function
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |
