1
0
Fork 0
mirror of https://github.com/Reuh/ubiquitousse.git synced 2025-10-28 01:29:31 +00:00

DAMN SEQUENTIAL ORDER

This commit is contained in:
Reuh 2017-04-05 21:08:34 +02:00
parent e063f55514
commit f3b5338779
3 changed files with 6 additions and 10 deletions

View file

@ -1,9 +1,6 @@
-- ubiquitousse.event
local uqt = require((...):match("^(.-ubiquitousse)%."))
local m = uqt.module
local input = uqt.input
local time = uqt.time
local scene = uqt.scene
--- The events: callback functions that will be called when something interesting occurs.
-- Theses are expected to be redefined in the game.
@ -18,15 +15,15 @@ return {
-- @tparam number dt time since last call, in miliseconds
-- @impl mixed
update = function(dt)
if m.input then input.update(dt) end
if m.time then time.update(dt) end
if m.scene then scene.update(dt) end
if m.input then uqt.input.update(dt) end
if m.time then uqt.time.update(dt) end
if m.scene then uqt.scene.update(dt) end
end,
--- Called each time the game expect a new frame to be drawn.
-- The screen is expected to be cleared since last frame.
-- @impl backend
draw = function()
if m.scene then scene.draw() end
if m.scene then uqt.scene.draw() end
end
}