Skip to main content

Class: ReturnToPoolStrategyComponent<T>

Defined in: lifecycle/strategies/return-to-pool-strategy-component.ts:8

Strategy component that marks an entity to be returned to a pool when its lifetime expires. This is a pure data component with no logic - it stores the pool reference.

Extends

Type Parameters

T

T extends NonNullable<unknown>

Constructors

Constructor

new ReturnToPoolStrategyComponent<T>(pool): ReturnToPoolStrategyComponent<T>

Defined in: lifecycle/strategies/return-to-pool-strategy-component.ts:17

Creates an instance of the ReturnToPoolStrategyComponent.

Parameters

pool

ObjectPool<T>

The object pool to return the entity to.

Returns

ReturnToPoolStrategyComponent<T>

Overrides

Component.constructor

Properties

pool

pool: ObjectPool<T>

Defined in: lifecycle/strategies/return-to-pool-strategy-component.ts:11

Accessors

id

Get Signature

get static id(): symbol

Defined in: ecs/types/Component.ts:12

The unique id of the component.

Returns

symbol

Inherited from

Component.id