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