diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-10-28 14:04:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-28 14:04:36 +0800 |
commit | 6af94008130dc5cbda7f0b1ac5954fa6baa0f079 (patch) | |
tree | bd7917a057b6f049d470593b95fccddc4479aed0 /meta/3rd/Defold/library/timer.lua | |
parent | 178d6258167de8a305284e65c413ce6f4df5b5e8 (diff) | |
parent | fb9253f807a99e43d9956a6e7b59da4435e4fbd7 (diff) | |
download | lua-language-server-6af94008130dc5cbda7f0b1ac5954fa6baa0f079.zip |
Merge pull request #2237 from carsakiller/replace-meta-3rd-with-submodules
Replace meta 3rd with LuaCATS submodules
Diffstat (limited to 'meta/3rd/Defold/library/timer.lua')
m--------- | meta/3rd/Defold | 0 | ||||
-rw-r--r-- | meta/3rd/Defold/library/timer.lua | 36 |
2 files changed, 0 insertions, 36 deletions
diff --git a/meta/3rd/Defold b/meta/3rd/Defold new file mode 160000 +Subproject 05379b40fb3084d82f7270475e42da8d521c4da diff --git a/meta/3rd/Defold/library/timer.lua b/meta/3rd/Defold/library/timer.lua deleted file mode 100644 index 4a112fcd..00000000 --- a/meta/3rd/Defold/library/timer.lua +++ /dev/null @@ -1,36 +0,0 @@ ----Timer API documentation ----Timers allow you to set a delay and a callback to be called when the timer completes. ----The timers created with this API are updated with the collection timer where they ----are created. If you pause or speed up the collection (using set_time_step) it will ----also affect the new timer. ----@class timer -timer = {} ----Indicates an invalid timer handle -timer.INVALID_TIMER_HANDLE = nil ----You may cancel a timer from inside a timer callback. ----Cancelling a timer that is already executed or cancelled is safe. ----@param handle hash # the timer handle returned by timer.delay() ----@return boolean # if the timer was active, false if the timer is already cancelled / complete -function timer.cancel(handle) end - ----Adds a timer and returns a unique handle ----You may create more timers from inside a timer callback. ----Using a delay of 0 will result in a timer that triggers at the next frame just before ----script update functions. ----If you want a timer that triggers on each frame, set delay to 0.0f and repeat to true. ----Timers created within a script will automatically die when the script is deleted. ----@param delay number # time interval in seconds ----@param _repeat boolean # true = repeat timer until cancel, false = one-shot timer ----@param callback fun(self: object, handle: number, time_elapsed: number) # timer callback function ----@return hash # handle identifier for the create timer, returns timer.INVALID_TIMER_HANDLE if the timer can not be created -function timer.delay(delay, _repeat, callback) end - ----Manual triggering a callback for a timer. ----@param handle hash # the timer handle returned by timer.delay() ----@return boolean # if the timer was active, false if the timer is already cancelled / complete -function timer.trigger(handle) end - - - - -return timer
\ No newline at end of file |