 | EntityManagerAddComponent Method (Int32, IEntityComponent, Boolean) |
Attaches the passed component to the entity with the specified id.
Namespace: Slash.ECS.ComponentsAssembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntaxpublic void AddComponent(
int entityId,
IEntityComponent component,
bool sendEvent
)
Public Sub AddComponent (
entityId As Integer,
component As IEntityComponent,
sendEvent As Boolean
)
public:
void AddComponent(
int entityId,
IEntityComponent^ component,
bool sendEvent
)
member AddComponent :
entityId : int *
component : IEntityComponent *
sendEvent : bool -> unit
Parameters
- entityId
- Type: SystemInt32
Id of the entity to attach the component to. - component
- Type: Slash.ECS.ComponentsIEntityComponent
Component to attach. - sendEvent
- Type: SystemBoolean
Indicates if an event should be send about the component adding.
Exceptions
See Also