 | EntityManagerGetEntityComponentsTComponentTypeA, TComponentTypeB Method |
Convenience method for retrieving components from two entities
in case the order of the entities is unknown.
Namespace: Slash.ECS.ComponentsAssembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntaxpublic bool GetEntityComponents<TComponentTypeA, TComponentTypeB>(
Entity2Data data,
out int entityIdA,
out int entityIdB,
out TComponentTypeA componentA,
out TComponentTypeB componentB
)
where TComponentTypeA : class, IEntityComponent
where TComponentTypeB : class, IEntityComponent
Public Function GetEntityComponents(Of TComponentTypeA As {Class, IEntityComponent}, TComponentTypeB As {Class, IEntityComponent}) (
data As Entity2Data,
<OutAttribute> ByRef entityIdA As Integer,
<OutAttribute> ByRef entityIdB As Integer,
<OutAttribute> ByRef componentA As TComponentTypeA,
<OutAttribute> ByRef componentB As TComponentTypeB
) As Boolean
public:
generic<typename TComponentTypeA, typename TComponentTypeB>
where TComponentTypeA : ref class, IEntityComponent
where TComponentTypeB : ref class, IEntityComponent
bool GetEntityComponents(
Entity2Data^ data,
[OutAttribute] int% entityIdA,
[OutAttribute] int% entityIdB,
[OutAttribute] TComponentTypeA% componentA,
[OutAttribute] TComponentTypeB% componentB
)
member GetEntityComponents :
data : Entity2Data *
entityIdA : int byref *
entityIdB : int byref *
componentA : 'TComponentTypeA byref *
componentB : 'TComponentTypeB byref -> bool when 'TComponentTypeA : not struct and IEntityComponent when 'TComponentTypeB : not struct and IEntityComponent
Parameters
- data
- Type: Slash.ECS.EventsEntity2Data
Data for the event that affected two entities. - entityIdA
- Type: SystemInt32
Id of the entity having the first component attached. - entityIdB
- Type: SystemInt32
Id of the entity having the second component attached. - componentA
- Type: TComponentTypeA
First component. - componentB
- Type: TComponentTypeB
Second component.
Type Parameters
- TComponentTypeA
- Type of the first component to get.
- TComponentTypeB
- Type of the second component to get.
Return Value
Type:
Booleantrue, if one of the entities has a
TComponentTypeA
and the other one a
TComponentTypeB attached,
and
false otherwise.
See Also