Click or drag to resize
EntityManagerGetEntityComponentsTComponentTypeA, TComponentTypeB Method
Convenience method for retrieving components from two entities in case the order of the entities is unknown.

Namespace: Slash.ECS.Components
Assembly: Slash.ECS (in Slash.ECS.dll) Version: 1.0.6018.40178
Syntax
public 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

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: Boolean
true, if one of the entities has a TComponentTypeA and the other one a TComponentTypeB attached, and false otherwise.
See Also