bad syntax fix

This commit is contained in:
Samuel Pizette
2022-06-09 11:08:26 -04:00
parent 42f1870475
commit cb98307e44
25 changed files with 296 additions and 296 deletions

View File

@@ -4,39 +4,39 @@ Here is a list of all available functions for timers: <br>
## setTime
sets the time the timer should wait after calling your function
````lua
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):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)<br>
**returns:** self<br>
## start
starts the timer
````lua
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5):start()
````
```
**parameters:** -<br>
**returns:** self<br>
## cancel
stops/cancels the timer
````lua
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5):start()
aTimer:cancel()
````
```
**parameters:** -<br>
**returns:** self<br>
## onCall
adds a function to the timer
````lua
```lua
local function timerCall(self)
basalt.debug("i got called!")
end
@@ -44,6 +44,6 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5):onCall(timerCall):start()
````
```
**parameters:** function func<br>
**returns:** self<br>