Constructors
constructor
- new World<EntityType>(options?: WorldOptions): World<EntityType>
-
Type parameters
Parameters
-
Optional options: WorldOptions
Returns World<EntityType>
Properties
enabled
enabled: boolean
Methods
createEntity
- createEntity(name?: string): EntityType
-
Parameters
Returns EntityType
execute
- execute(delta?: number, time?: number): void
-
Parameters
-
Optional delta: number
-
Optional time: number
Returns void
getSystem
- getSystem<S>(System: SystemConstructor<S>): S
-
Type parameters
Parameters
-
System: SystemConstructor<S>
Returns S
getSystems
- getSystems(): System<Entity>[]
-
Returns System<Entity>[]
hasRegisteredComponent
-
Type parameters
Parameters
Returns boolean
play
-
Returns void
registerComponent
-
Type parameters
Parameters
-
-
Optional objectPool: false | ObjectPool<C>
Returns World<EntityType>
registerSystem
- registerSystem(System: SystemConstructor<any>, attributes?: object): World<EntityType>
-
Parameters
-
System: SystemConstructor<any>
-
Optional attributes: object
Returns World<EntityType>
stop
-
Returns void
unregisterSystem
- unregisterSystem(System: SystemConstructor<any>): World<EntityType>
-
Parameters
-
System: SystemConstructor<any>
Returns World<EntityType>
The World is the root of the ECS.