Hi there!
I created an timer Library
Any error tell me here
Timer
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Timer
Use it is simple:
This is a simple code to how to use that, and removing text when is not more need
The all callbacks is:
newTimer returns = {
update
Stop
Resume
getTime
setTime
reset
}
Code: Select all
timer = require 'timer'
show = true
n = timer.newTimer(timer.countdown, 10, function() show = false end) -- type, time, callback
--type for countdown is "1" or timer.countdown and countup is timer.countup or "2" (countup haven't an callback, use getTime() to do that)
function love.update(dt)
n.update(dt) --dt is needs
end
function love.draw()
if show then
love.graphics.print(n.getTime(), 90, 90)
end
end
The all callbacks is:
newTimer returns = {
update
Stop
Resume
getTime
setTime
reset
}
I'm me, and you are you
Who is online
Users browsing this forum: No registered users and 11 guests