Class EntityManager

Manages entities creation and component memory management.

Inherits from

  • Object (base class)

Constructors

Name Description
this Constructor of the entity-manager.

Properties

Name Type Description
accessor [set] void delegate(Entity e, C* pc) Set an accessor delegate for a component.
accessor [get] void delegate(Entity e, C* pc) Get the accessor delegate assigned to a component.
capacity [get] ulong Current capacity entity.
components [get] Return a range of all the valid instances of a component.
entitiesWith [get] Allows to browse through the entities that have a required set of components.
size [get] ulong Current number of managed entities.

Methods

Name Description
create Create an entity.
getEntity Returns an entity from an an entity-id
opApply Allows to browse through all the valid entities of the manager with a foreach loop.
valid Return true if the given entity ID is still valid.

Aliases

Name Description
CompAccessor

Authors

Claude Merle

Copyright

© 2015-2016 Claude Merle

License

This file is part of EntitySysD.

EntitySysD is free software: you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

EntitySysD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License along with EntitySysD. If not, see http://www.gnu.org/licenses/.