mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
add entities.name(...) and entity:get_name(...)
This commit is contained in:
parent
ec4043bc12
commit
5a3f28f2b5
6 changed files with 22 additions and 0 deletions
|
|
@ -15,6 +15,9 @@ entities.spawn(name: str, pos: vec3, [optional] args: table)
|
|||
-- Checks the existence of an entity by a unique identifier.
|
||||
entities.exists(uid: int) -> bool
|
||||
|
||||
-- Returns entity name (string ID).
|
||||
entities.name(uid: int) -> str
|
||||
|
||||
-- Returns a table of all loaded entities
|
||||
entities.get_all() -> table
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ The entity object is available in components as a global variable **entity**.
|
|||
-- Deletes an entity (the entity may continue to exist until the frame ends, but will not be displayed in that frame)
|
||||
entity:despawn()
|
||||
|
||||
-- Returns entity name (string ID)
|
||||
entity:get_name()
|
||||
|
||||
-- Returns the name of the entity skeleton
|
||||
entity:get_skeleton() -> str
|
||||
-- Replaces the entity skeleton
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue