function onUpdate() local curFps = ""..getPropertyFromClass("Main", "fpsVar.currentFPS") local memory = round(getPropertyFromClass("openfl.system.System", "totalMemory") / 1000000, 1); local memPeak = memory local peakLv = 0 setTextString("MemoryCounter", "Memory: " .. memory .. " mb") setTextString("fps", "FPS: " .. curFps .. "") function round(x, n) --e n = math.pow(10, n or 0) x = x * n if x >= 0 then x = math.floor(x + 0.5) else x = math.ceil(x - 0.5) end return x / n end
Cool ^^
function onUpdate()
local curFps = ""..getPropertyFromClass("Main", "fpsVar.currentFPS")
local memory = round(getPropertyFromClass("openfl.system.System", "totalMemory") / 1000000, 1);
local memPeak = memory
local peakLv = 0
setTextString("MemoryCounter", "Memory: " .. memory .. " mb")
setTextString("fps", "FPS: " .. curFps .. "")
function round(x, n) --e
n = math.pow(10, n or 0)
x = x * n
if x >= 0 then x = math.floor(x + 0.5) else x = math.ceil(x - 0.5) end
return x / n
end