public abstract class System<T extends Entity>
extends java.lang.Object
Systems as part of the Entity-Component-System pattern| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.Integer,T> |
entities |
protected boolean |
isDebugging |
| Constructor and Description |
|---|
System() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntity(T entity)
|
T |
getEntity(int id)
Returns the
Entity with the given ID |
boolean |
isDebugging()
Returns if this
System is debugging |
void |
removeEntity(T entity)
|
void |
setDebugging(boolean debugging)
Sets whether or not this
System is in debug mode |
abstract void |
update(float delta)
Updates all
Entitys in the system |
public T getEntity(int id)
Entity with the given IDid - The entity IDEntitypublic abstract void update(float delta)
Entitys in the systemdelta - The time since the last updatepublic boolean isDebugging()
System is debuggingpublic void setDebugging(boolean debugging)
System is in debug modedebugging - True if debugging