EntityManager class
Manages all the entities in a World.
Note: Technically speaking we can have multiple types of entities, there is nothing implemented on the World for it yet but this manager would be able to handle that easily.
Constructors
- EntityManager(World world)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- world → World
-
The World which this manager belongs to.
final
Methods
-
addComponentToEntity<
T extends Component< (V> , V>Entity entity, V? data) → void - Add given component to an entity.
-
createEntity(
[String? name]) → Entity - Create a new entity.
-
getEntityByName(
String name) → Entity? - Get an entity by name.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processRemovedEntities(
) → void - Process all removed entities from the last execute cycle.
-
removeComponentFromEntity<
T extends Component> (Entity entity) → void - Remove and dispose a component by generics.
-
removeEntity(
Entity entity) → void - Mark an entity for removal.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited