mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 09:30:03 +00:00
Return static function
This commit is contained in:
parent
0a1a7c1955
commit
db72d255b0
1 changed files with 13 additions and 9 deletions
|
@ -18,16 +18,20 @@ do
|
||||||
local w
|
local w
|
||||||
local dt
|
local dt
|
||||||
local systemsNames
|
local systemsNames
|
||||||
|
local system
|
||||||
|
|
||||||
local function run(system)
|
local function profile()
|
||||||
local name = systemsNames[system]
|
local name = systemsNames[system]
|
||||||
|
|
||||||
return function()
|
debug.profilebegin(name)
|
||||||
debug.profilebegin(name)
|
debug.setmemorycategory(name)
|
||||||
debug.setmemorycategory(name)
|
system(w, dt)
|
||||||
system(w, dt)
|
debug.profileend()
|
||||||
debug.profileend()
|
end
|
||||||
end
|
|
||||||
|
local function run(sys)
|
||||||
|
system = sys
|
||||||
|
return profile
|
||||||
end
|
end
|
||||||
|
|
||||||
local function loop(sinceLastFrame)
|
local function loop(sinceLastFrame)
|
||||||
|
@ -55,9 +59,9 @@ do
|
||||||
.. debug.info(system, "n")
|
.. debug.info(system, "n")
|
||||||
.. " has been ejected"
|
.. " has been ejected"
|
||||||
)
|
)
|
||||||
continue
|
else
|
||||||
|
LOOP_ERROR(why)
|
||||||
end
|
end
|
||||||
LOOP_ERROR(why)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
debug.profileend()
|
debug.profileend()
|
||||||
|
|
Loading…
Reference in a new issue