add entities.get_all(...), .get_all_in_box(...), .get_all_in_radius(...)
This commit is contained in:
@@ -14,6 +14,22 @@ 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 a table of all loaded entities
|
||||
entities.get_all() -> table
|
||||
|
||||
-- Returns a table of loaded entities based on the passed list of UIDs
|
||||
entities.get_all(uids: array<int>) -> table
|
||||
|
||||
-- Returns a list of UIDs of entities inside the rectangular area
|
||||
-- pos - minimal area corner
|
||||
-- size - area size
|
||||
entities.get_all_in_box(pos: vec3, size: vec3) -> array<int>
|
||||
|
||||
-- Returns a list of UIDs of entities inside the radius
|
||||
-- center - center of the area
|
||||
-- radius - radius of the area
|
||||
entities.get_all_in_radius(center: vec3, radius: number) -> array<int>
|
||||
```
|
||||
|
||||
```lua
|
||||
|
||||
Reference in New Issue
Block a user