 | EntityManagerGetEntityComponentTComponent Method |
Convenience method for retrieving a component from two possible entities.
Namespace: Slash.ECS.ComponentsAssembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntaxpublic bool GetEntityComponent<TComponent>(
Entity2Data data,
out int entityId,
out TComponent component
)
where TComponent : class, IEntityComponent
Public Function GetEntityComponent(Of TComponent As {Class, IEntityComponent}) (
data As Entity2Data,
<OutAttribute> ByRef entityId As Integer,
<OutAttribute> ByRef component As TComponent
) As Boolean
public:
generic<typename TComponent>
where TComponent : ref class, IEntityComponent
bool GetEntityComponent(
Entity2Data^ data,
[OutAttribute] int% entityId,
[OutAttribute] TComponent% component
)
member GetEntityComponent :
data : Entity2Data *
entityId : int byref *
component : 'TComponent byref -> bool when 'TComponent : not struct and IEntityComponent
Parameters
- data
- Type: Slash.ECS.EventsEntity2Data
Data for the event that affected two entities. - entityId
- Type: SystemInt32
Id of the entity having the component attached. - component
- Type: TComponent
Component.
Type Parameters
- TComponent
- Type of the component to get.
Return Value
Type:
Boolean
True if one of the entities has a
TComponent
attached; otherwise, false.
See Also