stdlib: fix event system switch
This commit is contained in:
parent
1bc3604f9f
commit
215aab41d3
|
@ -8,9 +8,9 @@ return function()
|
|||
P2:SetNoteDataFromLua({})
|
||||
end
|
||||
|
||||
function uranium.update()
|
||||
uranium.on('update', function()
|
||||
if b >= 1 then
|
||||
GAMESTATE:SetSongBeat(b % 1)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
|
@ -106,7 +106,7 @@ function self.isDown(i, pn)
|
|||
return self.getInput(i, pn) ~= -1
|
||||
end
|
||||
|
||||
function uranium.init()
|
||||
uranium.on('init', function()
|
||||
for pn = 1, 2 do
|
||||
for j, v in pairs(self.inputType) do
|
||||
local j = j -- lua scope funnies
|
||||
|
@ -124,6 +124,6 @@ function uranium.init()
|
|||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
return self
|
|
@ -14,6 +14,6 @@ require('stdlib.mirin.sort')
|
|||
require('stdlib.mirin.ease')
|
||||
require('stdlib.mirin.template')
|
||||
|
||||
function uranium.init()
|
||||
uranium.on('init', function()
|
||||
xero.init_command(xeroActorsAF)
|
||||
end
|
||||
end)
|
|
@ -1,14 +1,14 @@
|
|||
local oldAutoplay
|
||||
|
||||
return function()
|
||||
function uranium.ready()
|
||||
uranium.on('ready', function()
|
||||
oldAutoplay = PREFSMAN:GetPreference('AutoPlay')
|
||||
PREFSMAN:SetPreference('AutoPlay', 0)
|
||||
end
|
||||
end)
|
||||
|
||||
function uranium.exit()
|
||||
uranium.on('exit', function()
|
||||
if oldAutoplay and oldAutoplay ~= 0 then
|
||||
PREFSMAN:SetPreference('AutoPlay', oldAutoplay)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
|
@ -49,8 +49,8 @@ if PROFILER_ENABLED then
|
|||
text:Draw()
|
||||
end
|
||||
|
||||
function uranium.postUpdate(dt)
|
||||
uranium.on('postUpdate', function(dt)
|
||||
max(dt * 12)
|
||||
draw()
|
||||
end
|
||||
end)
|
||||
end
|
|
@ -176,18 +176,18 @@ function self.getLastSave()
|
|||
end
|
||||
end
|
||||
|
||||
function uranium.init()
|
||||
uranium.on('init', function()
|
||||
loadedSavedata = true
|
||||
if savedataName then
|
||||
self.load()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function self.enableAutosave()
|
||||
checkIfInitialized()
|
||||
function uranium.exit()
|
||||
uranium.on('exit', function()
|
||||
self.save(true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
return self
|
|
@ -40,7 +40,7 @@ function self:unscheduleInTicks(i)
|
|||
scheduledTicks[i] = nil
|
||||
end
|
||||
|
||||
function uranium.update(dt)
|
||||
uranium.on('update', function(dt)
|
||||
for k, s in pairs(scheduledTicks) do
|
||||
s[1] = s[1] - 1
|
||||
if s[1] <= 0 then
|
||||
|
@ -56,6 +56,6 @@ function uranium.update(dt)
|
|||
scheduled[k] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
return self
|
Loading…
Reference in New Issue