mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add entity:require_component
This commit is contained in:
parent
b406bc1ec4
commit
854dcf2a50
3 changed files with 11 additions and 0 deletions
|
|
@ -26,6 +26,8 @@ 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
|
||||
-- Retrieves a component by name. Throws an exception if it does not exist
|
||||
entity:require_component(name: str) -> component
|
||||
|
||||
-- Enables/disables the component
|
||||
entity:set_enabled(name: str, enable: bool)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue