Class: Matcher

Matcher

new entitas.Matcher()

Members

allOfIndicesnumber

A unique sequential index number assigned to each entity at creation

anyOfIndicesnumber

A unique sequential index number assigned to each entity at creation

idnumber

Get the matcher id

indicesArray.<number>

A list of the component ordinals that this matches

noneOfIndicesnumber

A unique sequential index number assigned to each entity at creation

Methods

Matches anyOf the components/indices specified

Returns:
Type Description
entitas.Matcher

matches(entity){boolean}

Check if the entity matches this matcher

Name Type Description
entity entitas.Entity
Returns:
Type Description
boolean

mergeIndices(){Array.<number>}

Merge list of component indices

Returns:
Type Description
Array.<number>

Matches noneOf the components/indices specified

Returns:
Type Description
entitas.Matcher

Subscribe to Entity Added event

Returns:
Type Description
entitas.TriggerOnEvent

onEntityAddedOrRemoved(){entitas.TriggerOnEvent}

Subscribe to Entity Added or Removed event

Returns:
Type Description
entitas.TriggerOnEvent

Subscribe to Entity Removed event

Returns:
Type Description
entitas.TriggerOnEvent

toString(){string}

toString representation of this matcher

Returns:
Type Description
string