 | EntityManagerAddComponent Method (Type, Int32, IAttributeTable) |
Adds a component with the specified type to entity with the
specified id and initializes it with the values taken from
the passed attribute table.
Namespace: Slash.ECS.ComponentsAssembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntaxpublic void AddComponent(
Type componentType,
int entityId,
IAttributeTable attributeTable
)
Public Sub AddComponent (
componentType As Type,
entityId As Integer,
attributeTable As IAttributeTable
)
public:
void AddComponent(
Type^ componentType,
int entityId,
IAttributeTable^ attributeTable
)
member AddComponent :
componentType : Type *
entityId : int *
attributeTable : IAttributeTable -> unit
Parameters
- componentType
- Type: SystemType
Type of the component to add. - entityId
- Type: SystemInt32
Id of the entity to add the component to. - attributeTable
- Type: Slash.Collections.AttributeTablesIAttributeTable
Attribute table to initialize the component with.
See Also