From 234adbc1468d75f829c8d8bfd0345fe0c16a6360 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 6 Sep 2017 02:57:06 +0200 Subject: Some additional info dislayed in debug mode --- main.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index ac04383..a71b9e2 100644 --- a/main.lua +++ b/main.lua @@ -47,12 +47,18 @@ function love.draw () love.graphics.setFont(Font) love.graphics.setColor(255, 0, 0, 255) love.graphics.print("Debug ON", 10, 10, 0, scale, scale) - love.graphics.setColor(255, 255, 255, 255) - love.graphics.print("Current FPS: "..tostring(love.timer.getFPS()), 10, 10+9*scale, 0, scale, scale) + if dbg_msg then + love.graphics.setColor(255, 255, 255, 255) + love.graphics.print(dbg_msg, 10, 10+9*scale, 0, scale, scale) + end end end -function love.update (dt) sceneManager:update(dt) end +function love.update (dt) + dbg_msg = string.format("FPS: %d\n", love.timer.getFPS()) + sceneManager:update(dt) +end + function love.quit () Settings.save() end -- Pass input to Controller -- cgit v1.1