 | EntityManagerGetComponentT Method (Int32) |
Gets a component of the passed type attached to the entity with the specified id.
Namespace: Slash.ECS.ComponentsAssembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntaxpublic T GetComponent<T>(
int entityId
)
where T : IEntityComponent
Public Function GetComponent(Of T As IEntityComponent) (
entityId As Integer
) As T
public:
generic<typename T>
where T : IEntityComponent
T GetComponent(
int entityId
)
member GetComponent :
entityId : int -> 'T when 'T : IEntityComponent
Parameters
- entityId
- Type: SystemInt32
Id of the entity to get the component of.
Type Parameters
- T
- Type of the component to get.
Return Value
Type:
T The component, if there is one of the specified type attached to the entity, and null otherwise.
Exceptions
See Also