new EntitySubscription(aspect, world)
Maintains the list of entities matched by an aspect.
Entity Subscriptions are automatically updated during the World#process.
Any SubscriptionListener are informed when entities are added or removed.
Parameters:
| Name | Type | Description |
|---|---|---|
aspect |
Aspect | |
world |
World |
Members
-
<static> ActiveEntitiesId :Array.<Number>
-
Type:
- Array.<Number>
-
<static> Aspect :Aspect
-
Type:
-
<static> InsertedIds :Array.<Number>
-
Type:
- Array.<Number>
-
<static> Listeners :Array.<Object>
-
Type:
- Array.<Object>
-
<static> RemovedIds :Array.<Number>
-
Type:
- Array.<Number>
-
<static> World :World
-
Copy of World instance
Type:
Methods
-
checkEntity(entityId)
-
Check the interesting aspect of the entity
Parameters:
Name Type Description entityIdinteger -
getActiveEntities()
-
Get array of active entities ids
- Deprecated:
-
- Yes
-
getAspect()
-
Get Aspect Object
Returns:
- Type
- Aspect
-
getEntities()
-
Get array of active entities ids
Returns:
entitiesid
- Type
- Array.<Number>
-
informEntityChanges()
-
Inform the listener of change
Returns:
If the entity changes
- Type
- boolean
-
process(changedIds, removedIds)
-
Process the EntitySubscription
Parameters:
Name Type Description changedIdsArray.<Number> Set of changed Ids
removedIdsArray.<Number> Set of removed Ids