Entitas  0.35.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
MatcherStatic.cs
1 namespace Entitas {
2 
3  public partial class Matcher {
4 
5  public static IAllOfMatcher AllOf(params int[] indices) {
6  var matcher = new Matcher();
7  matcher._allOfIndices = distinctIndices(indices);
8  return matcher;
9  }
10 
11  public static IAllOfMatcher AllOf(params IMatcher[] matchers) {
12  var allOfMatcher = (Matcher)Matcher.AllOf(mergeIndices(matchers));
13  setComponentNames(allOfMatcher, matchers);
14  return allOfMatcher;
15  }
16 
17  public static IAnyOfMatcher AnyOf(params int[] indices) {
18  var matcher = new Matcher();
19  matcher._anyOfIndices = distinctIndices(indices);
20  return matcher;
21  }
22 
23  public static IAnyOfMatcher AnyOf(params IMatcher[] matchers) {
24  var anyOfMatcher = (Matcher)Matcher.AnyOf(mergeIndices(matchers));
25  setComponentNames(anyOfMatcher, matchers);
26  return anyOfMatcher;
27  }
28  }
29 }