Added FPS counter to debug info.
This commit is contained in:
3
main.lua
3
main.lua
@@ -89,11 +89,12 @@ function love.draw()
|
|||||||
|
|
||||||
if Debug then
|
if Debug then
|
||||||
love.graphics.setColor(0, 0, 0)
|
love.graphics.setColor(0, 0, 0)
|
||||||
love.graphics.rectangle('fill', 0, 0, 140, 40)
|
love.graphics.rectangle('fill', 0, 0, 140, 50)
|
||||||
love.graphics.setColor()
|
love.graphics.setColor()
|
||||||
love.graphics.print(string.format('OS: %s', love.system.getOS()), 5, 5)
|
love.graphics.print(string.format('OS: %s', love.system.getOS()), 5, 5)
|
||||||
love.graphics.print(string.format('Love version: %s', love.getVersion()), 5, 15)
|
love.graphics.print(string.format('Love version: %s', love.getVersion()), 5, 15)
|
||||||
love.graphics.print(string.format('Memory usage: %s KiB', love.system.getMemUsage()), 5, 25)
|
love.graphics.print(string.format('Memory usage: %s KiB', love.system.getMemUsage()), 5, 25)
|
||||||
|
love.graphics.print(string.format('FPS: %.2f', 1.0 / love.timer.getAverageDelta()), 5, 35)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user