From 39400003a7baf0106508c3f1805bb68f6d2e00f1 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Tue, 10 May 2022 21:24:41 +0200 Subject: [PATCH] Updated Timer (markdown) --- Timer.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() ````