update doc/*/scripting/ecs.md

This commit is contained in:
MihailRis 2026-04-03 19:37:06 +03:00
parent 1fbf16e3dc
commit ec5e447057
2 changed files with 6 additions and 2 deletions

View file

@ -32,7 +32,9 @@ entity:require_component(name: str) -> component
-- Enables/disables the component
entity:set_enabled(name: str, enable: bool)
-- Returns id of player the entity is bound
-- Returns id of player the entity is bound, otherwise -1 is returned.
-- At components initialization -1 is also returned,
-- since the binding occurs after initialization.
entity:get_player() -> int or nil
```

View file

@ -32,7 +32,9 @@ entity:require_component(name: str) -> компонент
-- Включает/выключает компонент по имени
entity:set_enabled(name: str, enable: bool)
-- Возвращает id игрока, к которому привязана сущность
-- Возвращает id игрока, к которому привязана сущность, в ином же случае возвращает -1.
-- Во время инициализации компонентов при спавне сущности так же возвращает -1,
-- так как привязка происходит после инициализации.
entity:get_player() -> int или nil
```