mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-12-16 13:39:09 +00:00
LÖVE 11.1
This commit is contained in:
parent
389ebcba8d
commit
bdb9e710d9
3 changed files with 5 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
--- Löve backend 0.0.1 for Ubiquitousse.
|
--- Löve backend 0.0.1 for Ubiquitousse.
|
||||||
-- Provides all the Ubiquitousse API on a Löve environment.
|
-- Provides all the Ubiquitousse API on a Löve environment.
|
||||||
-- Made for Löve 0.10.1 and Ubiquitousse 0.0.1.
|
-- Made for Löve 11.1.0 and Ubiquitousse 0.0.1.
|
||||||
-- See `ubiquitousse` for Ubiquitousse API.
|
-- See `ubiquitousse` for Ubiquitousse API.
|
||||||
|
|
||||||
-- Config
|
-- Config
|
||||||
|
|
@ -26,7 +26,7 @@ do
|
||||||
love.window.showMessageBox("Warning", txt, "warning")
|
love.window.showMessageBox("Warning", txt, "warning")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
checkCompat("Löve", "0.10.2", ("%s.%s.%s"):format(love.getVersion()))
|
checkCompat("Löve", "11.1.0", ("%s.%s.%s"):format(love.getVersion()))
|
||||||
checkCompat("Ubiquitousse", "0.0.1", uqt.version)
|
checkCompat("Ubiquitousse", "0.0.1", uqt.version)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ scene = {
|
||||||
switch = function(scenePath, ...)
|
switch = function(scenePath, ...)
|
||||||
local previous = scene.current
|
local previous = scene.current
|
||||||
scene.current = scene.load(scene.prefix..scenePath)
|
scene.current = scene.load(scene.prefix..scenePath)
|
||||||
scene.current.name = scenePath
|
scene.current.name = scene.current.name or scenePath
|
||||||
if previous then previous:exit() end
|
if previous then previous:exit() end
|
||||||
scene.current:enter(...)
|
scene.current:enter(...)
|
||||||
scene.stack[math.max(#scene.stack, 1)] = scene.current
|
scene.stack[math.max(#scene.stack, 1)] = scene.current
|
||||||
|
|
@ -94,7 +94,7 @@ scene = {
|
||||||
push = function(scenePath, ...)
|
push = function(scenePath, ...)
|
||||||
local previous = scene.current
|
local previous = scene.current
|
||||||
scene.current = scene.load(scene.prefix..scenePath)
|
scene.current = scene.load(scene.prefix..scenePath)
|
||||||
scene.current.name = scenePath
|
scene.current.name = scene.current.name or scenePath
|
||||||
if previous then previous:suspend() end
|
if previous then previous:suspend() end
|
||||||
scene.current:enter(...)
|
scene.current:enter(...)
|
||||||
table.insert(scene.stack, scene.current)
|
table.insert(scene.stack, scene.current)
|
||||||
|
|
|
||||||
2
time.lua
2
time.lua
|
|
@ -85,7 +85,7 @@ local function newTimerRegistry()
|
||||||
for _, f in ipairs(t.onStart) do f(t.object) end
|
for _, f in ipairs(t.onStart) do f(t.object) end
|
||||||
end
|
end
|
||||||
assert(coroutine.resume(co, function(delay)
|
assert(coroutine.resume(co, function(delay)
|
||||||
t.after = delay
|
t.after = delay or 0
|
||||||
d[func] = t
|
d[func] = t
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
end, dt))
|
end, dt))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue