public abstract class System<T extends Entity>
extends java.lang.Object
System
s as part of the Entity-Component-System patternModifier 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
Entity s in the system |
public T getEntity(int id)
Entity
with the given IDid
- The entity IDEntity
public abstract void update(float delta)
Entity
s 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