edtris/game/mode.fnl

17 lines
391 B
Fennel

(local state (require :game.state))
(local map (require :game.tilemap))
(local rules (require :game.rules))
(fn update [dt]
(map.update-entitymap state.bombs dt rules)
(each [_ entity (ipairs state.entities)]
(entity:update dt rules)))
(fn draw []
(map.draw-tilemaps 0 0 [state.bombs state.map])
(each [_ entity (ipairs state.entities)]
(entity:draw)))
{: update : draw}