Mallet Engine
2
Entity-Component based game engine, written in Java.
|
Public Member Functions | |
void | addQuery (final QueryInterface _interface) |
Entity | queryForEntity (final String _queryName, final Settings _query) |
ArrayList< Entity > | queryForEntities (final String _queryName, final Settings _query) |
void | addEntity (final Entity _entity) |
void | removeEntity (final Entity _entity) |
void | clear () |
Protected Attributes | |
HashMap< String, QueryInterface > | queryInterfaces = new HashMap<String, QueryInterface>() |
The Query System was designed to allow the developer to search the Entities of a GameState in a range of optimal ways depending on what the GameState required.
It contains different ways in how a developer could search the Entities, what queries are available is dependant on which ones the developer adds to the system.
void com.linxonline.mallet.entity.query.QuerySystem.addEntity | ( | final Entity | _entity | ) |
void com.linxonline.mallet.entity.query.QuerySystem.addQuery | ( | final QueryInterface | _interface | ) |
ArrayList<Entity> com.linxonline.mallet.entity.query.QuerySystem.queryForEntities | ( | final String | _queryName, |
final Settings | _query | ||
) |
Return an Entities Based Specify a Query by _queryName And use _query to denote the specific criteria the Query will use to search for the Entities
Implements com.linxonline.mallet.entity.query.SearchInterface.
Entity com.linxonline.mallet.entity.query.QuerySystem.queryForEntity | ( | final String | _queryName, |
final Settings | _query | ||
) |
Return an Entity Based Specify a Query by _queryName And use _query to denote the specific criteria the Query will use to search for the Entity
Implements com.linxonline.mallet.entity.query.SearchInterface.
void com.linxonline.mallet.entity.query.QuerySystem.removeEntity | ( | final Entity | _entity | ) |
HashMap<String, QueryInterface> com.linxonline.mallet.entity.query.QuerySystem.queryInterfaces = new HashMap<String, QueryInterface>() [protected] |
HashMap horribly slow to iterate over, possibly replace with a tree structure?