new World()
The primary instance for the game.
Members
-
<static> archetypeManager :ArchetypeManager
-
Type:
-
<static> aspectSubscriptionManager :AspectSubscriptionManager
-
Type:
-
<static> changedIds- :number
-
Array of Entities Id which will be add or change
Type:
- number
-
<static> componentManager :ComponentManager
-
Type:
-
<static> em :EntityManager
-
Type:
-
<static> removeIds :Array.<number>
-
Array of Entities Id which will be remove
Type:
- Array.<number>
-
<static> systems :Object
-
Systems' Containers
Type:
- Object
Methods
-
addSystem(systemName, system)
-
Add a new system with its name and class
Parameters:
Name Type Description systemName
string system
Object -
getArchetypeManager()
-
Get the Archetype Manager
Returns:
- Type
- ArchetypeManager
-
getAspectSubscriptionManager()
-
Get the Aspect Subscription Manager
Returns:
-
getComponentManager()
-
Get the component manager
Returns:
- Type
- ComponentManager
-
getEntityManager()
-
Get the Entity Manager
Returns:
- Type
- EntityManager
-
getSystem(systemName)
-
Get a specific function with this name.
Parameters:
Name Type Description systemName
string System's name
Returns:
the system's object
- Type
- Object
-
getSystems()
-
Get all systems
Returns:
Array of Systems
- Type
- array
-
removeSystem(systemName)
-
Remove a system
Parameters:
Name Type Description systemName
string -
updateEntityStates()
-
For each change (add, change component of an id, remove), the aspect Subscription Manager is call