mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Add world.clear to types (#68)
* Sync typescript types to 0.2.2 * semicolon * Add world.clear to the types * Add luau type for clear
This commit is contained in:
parent
6b8dde8fd3
commit
7d2cd6219b
2 changed files with 9 additions and 0 deletions
6
src/index.d.ts
vendored
6
src/index.d.ts
vendored
|
@ -55,6 +55,12 @@ export class World {
|
|||
*/
|
||||
target(id: Entity, relation: Entity): Entity | undefined;
|
||||
|
||||
/**
|
||||
* Clears an entity from the world.
|
||||
* @praram id Entity to be cleared
|
||||
*/
|
||||
clear(id: Entity): void;
|
||||
|
||||
/**
|
||||
* Deletes an entity and all its related components and relationships.
|
||||
* @param id Entity to be destroyed
|
||||
|
|
|
@ -942,6 +942,9 @@ export type WorldShim = typeof(setmetatable(
|
|||
add: <T>(WorldShim, id: Entity, component: Entity<T>) -> (),
|
||||
--- Assigns a value to a component on the given entity
|
||||
set: <T>(WorldShim, id: Entity, component: Entity<T>, data: T) -> (),
|
||||
|
||||
-- Clears an entity from the world
|
||||
clear: (WorldShim, id: Entity) -> (),
|
||||
--- Removes a component from the given entity
|
||||
remove: (WorldShim, id: Entity, component: Entity) -> (),
|
||||
--- Retrieves the value of up to 4 components. These values may be nil.
|
||||
|
|
Loading…
Reference in a new issue