Compare commits
2 Commits
e3453aa49c
...
97f91fb298
Author | SHA1 | Date |
---|---|---|
Jill | 97f91fb298 | |
Jill | 89adfc8cb4 |
2
main.xml
2
main.xml
|
@ -698,7 +698,9 @@
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
uranium:call('preUpdate', dt)
|
||||||
uranium:call('update', dt)
|
uranium:call('update', dt)
|
||||||
|
uranium:call('postUpdate', dt)
|
||||||
|
|
||||||
errored = false
|
errored = false
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ if PROFILER_ENABLED then
|
||||||
local function draw()
|
local function draw()
|
||||||
if not profilerInfo[profilerShowing] then return end
|
if not profilerInfo[profilerShowing] then return end
|
||||||
|
|
||||||
quad:diffuse(0.2, 1, 0.2, 0.9)
|
quad:diffuse(0.2, 1, 0.2, 0.8)
|
||||||
quad:align(0, 0)
|
quad:align(0, 0)
|
||||||
text:align(0, 0)
|
text:align(0, 0)
|
||||||
text:shadowlength(0)
|
text:shadowlength(0)
|
||||||
|
@ -28,13 +28,13 @@ if PROFILER_ENABLED then
|
||||||
quad:Draw()
|
quad:Draw()
|
||||||
|
|
||||||
text:settext((math.floor(e.t * 100000) / 100) .. 'ms')
|
text:settext((math.floor(e.t * 100000) / 100) .. 'ms')
|
||||||
text:xy(0, i * 24)
|
text:xy(0, i * 24 - 3)
|
||||||
text:zoom(0.3)
|
text:zoom(0.4)
|
||||||
text:diffuse(0.2, 0.2, 0.2, 0.9)
|
text:diffuse(0.2, 0.2, 0.2, 0.9)
|
||||||
text:Draw()
|
text:Draw()
|
||||||
text:settext(e.src)
|
text:settext(e.src)
|
||||||
text:xy(0, i * 24 + 12)
|
text:xy(0, i * 24 + 8)
|
||||||
text:zoom(0.2)
|
text:zoom(0.4)
|
||||||
text:diffuse(0.1, 0.1, 0.1, 0.9)
|
text:diffuse(0.1, 0.1, 0.1, 0.9)
|
||||||
text:Draw()
|
text:Draw()
|
||||||
end
|
end
|
||||||
|
@ -49,7 +49,7 @@ if PROFILER_ENABLED then
|
||||||
text:Draw()
|
text:Draw()
|
||||||
end
|
end
|
||||||
|
|
||||||
function uranium.update(dt)
|
function uranium.postUpdate(dt)
|
||||||
max(dt * 12)
|
max(dt * 12)
|
||||||
draw()
|
draw()
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,7 @@ local self = {}
|
||||||
|
|
||||||
local binser = require('stdlib.binser')
|
local binser = require('stdlib.binser')
|
||||||
require('stdlib.util')
|
require('stdlib.util')
|
||||||
|
local scheduler = require('stdlib.scheduler')
|
||||||
|
|
||||||
local savedataName
|
local savedataName
|
||||||
local savedata = {
|
local savedata = {
|
||||||
|
@ -158,6 +159,11 @@ function self.save(instant)
|
||||||
uranium:call('saveFinished')
|
uranium:call('saveFinished')
|
||||||
else
|
else
|
||||||
self.saveNextFrame = true
|
self.saveNextFrame = true
|
||||||
|
scheduler:scheduleInTicks(2, function()
|
||||||
|
self.saveNextFrame = false
|
||||||
|
PROFILEMAN:SaveMachineProfile()
|
||||||
|
uranium:call('saveFinished')
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -177,15 +183,6 @@ function uranium.init()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function uranium.update()
|
|
||||||
if self.saveNextFrame then
|
|
||||||
self.saveNextFrame = false
|
|
||||||
PROFILEMAN:SaveMachineProfile()
|
|
||||||
uranium:call('saveFinished')
|
|
||||||
print('saved to profile')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function self.enableAutosave()
|
function self.enableAutosave()
|
||||||
checkIfInitialized()
|
checkIfInitialized()
|
||||||
function uranium.exit()
|
function uranium.exit()
|
||||||
|
|
Loading…
Reference in New Issue