A timer system to call a function after a certain amount of time.
More...
|
string | AddTimerByName (string strName, double delay, bool repeat, function func, object[] paramTable=null, int flags=0) |
|
void | RemoveTimerByName (string strName) |
|
int | AddTimer (double delay, bool repeat, function func, object[] paramTable=null, int flags=0, object[] value={}) |
|
void | RemoveTimer (int idx) |
|
A timer system to call a function after a certain amount of time.
The Timer table allows the developer to easily add synchronized callbacks. Read a tutorial on it here: http://zombiescanfly.com/vslib/
int VSLib.Timers.AddTimer |
( |
double |
delay, |
|
|
bool |
repeat, |
|
|
function |
func, |
|
|
object[] |
paramTable = null , |
|
|
int |
flags = 0 , |
|
|
object[] |
value = {} |
|
) |
| |
|
private |
Calls a function and passes the specified table to the callback after the specified delay. Returns the current timer index (which you can use to delete the timer later with Timers::RemoveTimer function).
string VSLib.Timers.AddTimerByName |
( |
string |
strName, |
|
|
double |
delay, |
|
|
bool |
repeat, |
|
|
function |
func, |
|
|
object[] |
paramTable = null , |
|
|
int |
flags = 0 |
|
) |
| |
|
private |
Creates a named timer that will be added to the timers list. If a named timer already exists, it will be replaced.
- Returns
- Name of the created timer
void VSLib.Timers.RemoveTimer |
( |
int |
idx | ) |
|
|
private |
Removes the specified timer.
void VSLib.Timers.RemoveTimerByName |
( |
string |
strName | ) |
|
|
private |
The documentation for this class was generated from the following file: