diff --git a/Timer.md b/Timer.md index e799b29..c5cf577 100644 --- a/Timer.md +++ b/Timer.md @@ -6,7 +6,7 @@ Here is a list of all available functions for timers:
sets the time the timer should wait after calling your function ````lua local mainFrame = basalt.createFrame("myFirstFrame"):show() -local aTimer = mainFrame:addTimer("myFirstTimer"):show() +local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5) ```` **parameters:**number time[, number repeats] - (time in seconds, if repeats is -1 it will call the function infinitly (every x seconds)
@@ -16,7 +16,7 @@ aTimer:setTime(5) starts the timer ````lua local mainFrame = basalt.createFrame("myFirstFrame"):show() -local aTimer = mainFrame:addTimer("myFirstTimer"):show() +local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5):start() ```` **parameters:** -
@@ -26,7 +26,7 @@ aTimer:setTime(5):start() stops/cancels the timer ````lua local mainFrame = basalt.createFrame("myFirstFrame"):show() -local aTimer = mainFrame:addTimer("myFirstTimer"):show() +local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5):start() aTimer:cancel() ```` @@ -41,7 +41,7 @@ local function timerCall(self) basalt.debug("i got called!") end local mainFrame = basalt.createFrame("myFirstFrame"):show() -local aTimer = mainFrame:addTimer("myFirstTimer"):show() +local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5):onCall(timerCall):start() ````