scheduler
This commit is contained in:
parent
daa4e52b37
commit
141b1947b1
25
MANUAL.md
25
MANUAL.md
|
@ -76,6 +76,11 @@ Uranium Template originally formed during the creation of a currently unreleased
|
|||
- [`input`](#input)
|
||||
- [A note about keyboard inputs](#a-note-about-keyboard-inputs)
|
||||
- [`bitop`](#bitop)
|
||||
- [`scheduler`](#scheduler)
|
||||
- [`schedule(when: number, func: function): number`](#schedulewhen-number-func-function-number)
|
||||
- [`scheduleInTicks(when: number, func: function): number`](#scheduleintickswhen-number-func-function-number)
|
||||
- [`unschedule(i: index): void`](#unschedulei-index-void)
|
||||
- [`unscheduleInTicks(i: index): void`](#unscheduleinticksi-index-void)
|
||||
- [`rng`](#rng)
|
||||
- [`rng.init(seed: number[] | nil): rng`](#rnginitseed-number--nil-rng)
|
||||
- [`rng(a: number | nil, b: number | nil): number`](#rnga-number--nil-b-number--nil-number)
|
||||
|
@ -557,6 +562,26 @@ local isDebugKeyAndShiftHeld = isDebugKeyHeld and special.shift
|
|||
|
||||
A Lua 5.0 port of [bitop-lua](https://github.com/AlberTajuelo/bitop-lua). See their repository for documentation.
|
||||
|
||||
### `scheduler`
|
||||
|
||||
A simple scheduler.
|
||||
|
||||
#### `schedule(when: number, func: function): number`
|
||||
|
||||
Schedules a function to run in a specific amount of time. `when` is in seconds.
|
||||
|
||||
#### `scheduleInTicks(when: number, func: function): number`
|
||||
|
||||
Schedules a function to run in a specific amount of `uranium.update` calls/ticks.
|
||||
|
||||
#### `unschedule(i: index): void`
|
||||
|
||||
Unschedules a function. Use the index returned to you when originally scheduling the function.
|
||||
|
||||
#### `unscheduleInTicks(i: index): void`
|
||||
|
||||
Unschedules a function in ticks. Use the index returned to you when originally scheduling the function.
|
||||
|
||||
### `rng`
|
||||
|
||||
A xoshiro128** reimplementation in Lua.
|
||||
|
|
2
template
2
template
|
@ -1 +1 @@
|
|||
Subproject commit 34fac4aa998198205cc930ee6cb19d9a5b01974e
|
||||
Subproject commit dfb89ab405dad62c1d64a7f4456b8f002f8db8f4
|
Loading…
Reference in New Issue