-
Notifications
You must be signed in to change notification settings - Fork 1
/
Timer.d.tl
31 lines (26 loc) · 980 Bytes
/
Timer.d.tl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
local type Timer = record
type DuringFunc = function(dt: number, time: number, delay: number)
type Tag = string
new: function(): Timer
update: function(Timer, dt: number)
after: function(
self: Timer, delay: number, action: function(number), tag:string
): Tag
every: function(
self: Timer, delay: number, action: function(number),
count: number, after: function, tag:string
): Tag
during: function(
self: Timer, delay: number, action: DuringFunc,
after: function, tag:string
): Tag
tween: function(
self: Timer, delay: number, subject: any, target: any,
method: string, after: function, tag: string, ...:any
): Tag
cancel: function(self: Timer, tag: Tag) -- disable timer by tag
destroy: function(self: Timer) -- disable all timers
--script: function(self: Timer) -- wrap to coroutine
--metamethod __call: function(self: Timer): Timer
end
return Timer