Difference between revisions of "Donut"
Line 8: | Line 8: | ||
== Usage == | == Usage == | ||
<source lang="lua"> | <source lang="lua"> | ||
− | require("donut | + | require("donut") |
function love.load() | function love.load() |
Revision as of 00:51, 21 February 2012
Donut is a simplified debug message control system for LÖVE.
Contents
Debug message control system? wth???
You're able to add debug messages like this:
Usage
require("donut")
function love.load()
debug = Donut.init(10, 10)
fps = debug.add("FPS")
random = debug.add("Random")
end
function love.update(dt)
debug.update(fps, love.timer.getFPS())
debug.update(random, math.random(0, 100))
end
function love.keypressed(key, unicode)
if key == "s" then -- show/hide with "s"
debug.toggle()
end
end
function love.draw()
debug.draw()
end
Documentation
coming soon...