The class used to manage node lists. In most cases the default class is sufficient but it is exposed here so advanced developers can choose to create and use a different implementation.
The class must implement the Family interface.
Dispatched when the update loop ends. If you want to add and remove systems from the engine it is usually best not to do so during the update loop. To avoid this you can listen for this signal and make the change when the signal is dispatched.
Indicates if the engine is currently in its update loop.
Add an entity to the engine.
The entity to add.
Add a system to the engine, and set its priority for the order in which the systems are updated by the engine update loop.
The priority dictates the order in which the systems are updated by the engine update loop. Lower numbers for priority are updated first. i.e. a priority of 1 is updated before a priority of 2.
The system to add to the engine.
The priority for updating the systems during the engine loop. A lower number means the system is updated sooner.
Get a collection of nodes from the engine, based on the type of the node required.
The engine will create the appropriate NodeList if it doesn't already exist and will keep its contents up to date as entities are added to and removed from the engine.
If a NodeList is no longer required, release it with the releaseNodeList method.
The type of node required.
A linked list of all nodes of this type from all entities in the engine.
Get the system instance of a particular type from within the engine.
The type of system
The instance of the system type that is in the engine, or null if no systems of this type are in the engine.
If a NodeList is no longer required, this method will stop the engine updating the list and will release all references to the list within the framework classes, enabling it to be garbage collected.
It is not essential to release a list, but releasing it will free up memory and processor resources.
The type of the node class if the list to be released.
Remove an entity from the engine.
The entity to remove.
Remove a system from the engine.
The system to remove from the engine.
Update the engine. This causes the engine update loop to run, calling update on all the systems in the engine.
The package net.richardlord.ash.tick contains classes that can be used to provide a steady or variable tick that calls this update method.
The duration, in seconds, of this update step.
Generated using TypeDoc
The Engine class is the central point for creating and managing your game state. Add entities and systems to the engine, and fetch families of nodes from the engine.