Click or drag to resize
ComponentManager Class
Maps entity ids to specific game components. By contract this manager should be responsible for mapping components of a single type, only. This way, entity ids can be mapped to different components, one of each type.
Inheritance Hierarchy
SystemObject
  Slash.ECS.ComponentsComponentManager

Namespace: Slash.ECS.Components
Assembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntax
public sealed class ComponentManager

The ComponentManager type exposes the following members.

Constructors
  NameDescription
Public methodComponentManager
Constructs a new component manager without any initial components.
Top
Methods
  NameDescription
Public methodAddComponent
Attaches the passed component to the entity with the specified id. Note that this manager does not check whether the specified id is valid.
Public methodComponents
Returns an iterator over all components of this manager.
Public methodEntities
Returns an iterator over all entities having components of this manager attached.
Public methodGetComponent
Gets the component mapped to the entity with the specified id. Note that this manager does not check whether the specified id is valid.
Public methodRemoveComponent(Int32)
Removes the component mapped to the entity with the specified id. Note that this manager does not check whether the specified id is valid.
Public methodRemoveComponent(Int32, IEntityComponent)
Removes the component mapped to the entity with the specified id. Note that this manager does not check whether the specified id is valid.
Top
Events
  NameDescription
Public eventComponentAdded
Callback when a new component was added.
Public eventComponentRemoved
Callback when a component was removed.
Top
See Also