diff --git a/src/index.d.ts b/src/index.d.ts index 6ab901a..6a42670 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -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 diff --git a/src/init.luau b/src/init.luau index 6b8606f..af9de90 100644 --- a/src/init.luau +++ b/src/init.luau @@ -942,6 +942,9 @@ export type WorldShim = typeof(setmetatable( add: (WorldShim, id: Entity, component: Entity) -> (), --- Assigns a value to a component on the given entity set: (WorldShim, id: Entity, component: Entity, 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.