public class Level extends java.lang.Object implements ILevel
| Modifier and Type | Method and Description |
|---|---|
IEntity |
addEntity(IEntity entity)
Adds an entity.
|
void |
addMetadata(java.lang.String key,
java.lang.String value)
Add a piece of metadata to this level
|
boolean |
containsID(java.lang.String id)
Check whether this system contains an entity with provided ID.
|
IEntity |
createEntity()
Creates an entity.
|
java.util.Collection<IEntity> |
getAllEntities()
Get all entites in the system.
|
IEntity |
getEntity(java.lang.String id)
Get an entity based on its id.
|
IEventSystem |
getEventSystem() |
java.lang.String |
getEventSystemPath()
Gets the Entity System's event system's XML path
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Gets the metadata about this level
|
java.lang.String |
getName()
Gets the Entity Systems name
|
IPhysicsEngine |
getPhysicsEngine() |
java.lang.String |
init(groovy.lang.GroovyShell shell,
ISystemManager game) |
boolean |
isEmpty()
Checks if any entities are in this system.
|
boolean |
removeEntity(java.lang.String id)
Remove entity with this ID.
|
void |
setEventSystemPath(java.lang.String eventSystemPath)
Sets the Entity System's event system's XML path
|
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Sets the metadata
|
void |
setName(java.lang.String name)
Names the entity System
|
void |
update(double dt) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEntities, addEntities, clear, containsEntity, createEntityFromDefault, createEntityFromLoad, getAllComponents, getAllComponentsOfType, getAllIDS, getAllNames, getComponentOfEntity, getEntitiesWithComponent, getEntitiesWithComponents, getEntitiesWithComponents, getEntitiesWithName, removeAllBindingsFromComponentsclone, serialize, serializeToStringpublic void setName(java.lang.String name)
ILevelpublic java.lang.String getName()
ILevelpublic java.util.Map<java.lang.String,java.lang.String> getMetadata()
ILevelgetMetadata in interface ILevelpublic void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
ILevelsetMetadata in interface ILevelpublic void addMetadata(java.lang.String key,
java.lang.String value)
ILeveladdMetadata in interface ILevelkey - the field name (e.g. "Description")value - the field valuepublic java.lang.String init(groovy.lang.GroovyShell shell,
ISystemManager game)
public IEventSystem getEventSystem()
getEventSystem in interface ILevelpublic IPhysicsEngine getPhysicsEngine()
getPhysicsEngine in interface ILevelpublic java.lang.String getEventSystemPath()
ILevelgetEventSystemPath in interface ILevelpublic void setEventSystemPath(java.lang.String eventSystemPath)
ILevelsetEventSystemPath in interface ILeveleventSystemPath - string of event system file pathpublic IEntity createEntity()
ILevelcreateEntity in interface ILevelpublic IEntity addEntity(IEntity entity)
ILevelpublic IEntity getEntity(java.lang.String id)
ILevelpublic java.util.Collection<IEntity> getAllEntities()
ILevelgetAllEntities in interface ILevelpublic boolean containsID(java.lang.String id)
ILevelcontainsID in interface ILevelid - to checkpublic boolean removeEntity(java.lang.String id)
ILevelremoveEntity in interface ILevelid - to remove