Skip to content

Matcher Examples (Groups)

Marc A. Champlain edited this page May 25, 2018 · 1 revision

Matchers are generated by the code generator and can be combined. Matchers are usually used to get groups of entities from the context of interest. Remember to prefix the matcher with the context name you are interested (e.g. GameMatcher, InputMatcher, etc). We will use GameMatcher for these examples.


Anything That Doesn't Have Component NotMovable

GameMatcher.AnyOf().NoneOf(GameMatcher.NotMovable)

Get a group of entities which have Postion and Velocity components but does not have NotMovable component.

GameMatcher.AllOf(GameMatcher.Position, GameMatcher.Velocity).NoneOf(GameMatcher.NotMovable));
Clone this wiki locally