mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
update doc/*/scripting/ecs.md
This commit is contained in:
parent
bf79f6bc75
commit
c110fafbcf
2 changed files with 6 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ entity:has_component(name: str) -> bool
|
||||||
|
|
||||||
-- Enables/disables the component
|
-- Enables/disables the component
|
||||||
entity:set_enabled(name: str, enable: bool)
|
entity:set_enabled(name: str, enable: bool)
|
||||||
|
|
||||||
|
-- Returns id of player the entity is bound
|
||||||
|
entity:get_player() -> int or nil
|
||||||
```
|
```
|
||||||
|
|
||||||
## Built-in components
|
## Built-in components
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ entity:has_component(name: str) -> bool
|
||||||
|
|
||||||
-- Включает/выключает компонент по имени
|
-- Включает/выключает компонент по имени
|
||||||
entity:set_enabled(name: str, enable: bool)
|
entity:set_enabled(name: str, enable: bool)
|
||||||
|
|
||||||
|
-- Возвращает id игрока, к которому привязана сущность
|
||||||
|
entity:get_player() -> int или nil
|
||||||
```
|
```
|
||||||
|
|
||||||
## Встроенные компоненты
|
## Встроенные компоненты
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue