mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add on_update, on_render to docs & change entities tps to 20
This commit is contained in:
parent
3f67944cc2
commit
f8907f7db1
10 changed files with 62 additions and 21 deletions
|
|
@ -176,6 +176,18 @@ function on_save()
|
|||
|
||||
Called before component data is saved. Here you can write the data you want to save into the *SAVED_DATA* table, which is available for the entire life of the component.
|
||||
|
||||
```lua
|
||||
function on_update(tps: int)
|
||||
```
|
||||
|
||||
Called every entities tick (currently 20 times per second).
|
||||
|
||||
```lua
|
||||
function on_render(delta: number)
|
||||
```
|
||||
|
||||
Called every frame before the entity is rendered.
|
||||
|
||||
```lua
|
||||
function on_sensor_enter(index: int, entity: int)
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue