mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
Merge branch 'main' into release-0.26
This commit is contained in:
commit
b37c71059a
28 changed files with 111 additions and 59 deletions
|
|
@ -18,7 +18,7 @@ Creates a rule. If a handler is specified, returns the id for deletion.
|
|||
> Rules that have not been created can be used, but resetting via rules.reset will result in setting the value to nil.
|
||||
|
||||
```lua
|
||||
rules.listen(
|
||||
rules.listen(
|
||||
-- rule name
|
||||
name: str,
|
||||
-- value change handler function
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ entity:get_uid() -> int
|
|||
entity:get_component(name: str) -> component or nil
|
||||
-- Checks for the presence of a component by name
|
||||
entity:has_component(name: str) -> bool
|
||||
|
||||
-- Enables/disables the component
|
||||
entity:set_enabled(name: str, enable: bool)
|
||||
```
|
||||
|
||||
## Built-in components
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ entity:get_uid() -> int
|
|||
entity:get_component(name: str) -> компонент или nil
|
||||
-- Проверяет наличие компонента по имени
|
||||
entity:has_component(name: str) -> bool
|
||||
|
||||
-- Включает/выключает компонент по имени
|
||||
entity:set_enabled(name: str, enable: bool)
|
||||
```
|
||||
|
||||
## Встроенные компоненты
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue