class

Entitas::Matcher

Inherits Entitas::IAllOfMatcher / Entitas::IAnyOfMatcher / Entitas::INoneOfMatcher / Entitas::ICompoundMatcher / Entitas::IMatcher / Reference / Object

Constants

Log = ::Log.for(self)

Constructors

all_of(*comps : Entitas::Component::ComponentTypes) : Matcher

class ::Entitas::Matcher Create a matcher to match entities with "ALL" of the provided Entitas::Component classes

Entitas::Matcher.all_of(A, B)
all_of(*indices : Int32) : Matcher

Create a matcher to match entities that have "ALL" of the Entitas::Component classes in the provided Int32 indexs to merge

Entitas::Matcher.all_of(0)
all_of(*indices : Entitas::Component::Index) : Matcher

Create a matcher to match entities that have "ALL" of the Entitas::Component classes in the provided Entitas::Component::Index indices to merge

Entitas::Matcher.all_of(Entitas::Component::Index::A)
all_of(*matchers : Matcher) : Matcher

Create a matcher to match entities that have "ALL" of the Entitas::Component classes in the provided Entitas::Matcher instances to merge

m1 = Entitas::Matcher.all_of(A)
m2 = Entitas::Matcher.all_of(B)
matcher = Entitas::Matcher.all_of(m1, m2)
any_of(*comps : Entitas::Component::ComponentTypes) : Matcher

Create a matcher to match entities with "ANY" of the provided Entitas::Component classes

Entitas::Matcher.any_of(A, B)
any_of(*indices : Int32) : Matcher

Create a matcher to match entities that have "ANY" of the Entitas::Component classes in the provided Int32 indexs to merge

Entitas::Matcher.any_of(0)
any_of(*indices : Entitas::Component::Index) : Matcher

Create a matcher to match entities that have "ANY" of the Entitas::Component classes in the provided Entitas::Component::Index indices to merge

Entitas::Matcher.any_of(Entitas::Component::Index::A)
any_of(*matchers : Matcher) : Matcher

Create a matcher to match entities that have "ANY" of the Entitas::Component classes in the provided Entitas::Matcher instances to merge

m1 = Entitas::Matcher.any_of(A)
m2 = Entitas::Matcher.any_of(B)
matcher = Entitas::Matcher.any_of(m1, m2)
new(component_names : Array(String) = Array(String).new)
Source
none_of(*comps : Entitas::Component::ComponentTypes) : Matcher

Create a matcher to match entities with "NONE" of the provided Entitas::Component classes

Entitas::Matcher.none_of(A, B)
none_of(*indices : Int32) : Matcher

Create a matcher to match entities that have "NONE" of the Entitas::Component classes in the provided Int32 indexs to merge

Entitas::Matcher.none_of(0)
none_of(*indices : Entitas::Component::Index) : Matcher

Create a matcher to match entities that have "NONE" of the Entitas::Component classes in the provided Entitas::Component::Index indices to merge

Entitas::Matcher.none_of(Entitas::Component::Index::A)
none_of(*matchers : Matcher) : Matcher

Create a matcher to match entities that have "NONE" of the Entitas::Component classes in the provided Entitas::Matcher instances to merge

m1 = Entitas::Matcher.none_of(A)
m2 = Entitas::Matcher.none_of(B)
matcher = Entitas::Matcher.none_of(m1, m2)

Instance methods

==(other : Matcher)

Equality. Returns true if each element in self is equal to each corresponding element in other.

Source
added
Source
added_or_removed
Source
all_of(*comps : Entitas::Component::ComponentTypes) : IAllOfMatcher

Create a matcher to match entities with "ALL" of the provided Entitas::Component classes

Entitas::Matcher.new.all_of(A, B)
all_of(*indices : Int32) : IAllOfMatcher

Create a matcher to match entities that have "ALL" of the Entitas::Component classes in the provided Int32 indices to merge

Entitas::Matcher.new.all_of(0)
all_of(*indices : Entitas::Component::Index) : IAllOfMatcher

Create a matcher to match entities that have "ALL" of the Entitas::Component classes in the provided Entitas::Component::Index indices to merge

Entitas::Matcher.new.all_of(Entitas::Component::Index::A)
all_of(*matchers : IMatcher) : IAllOfMatcher

Create a matcher to match entities that have "ALL" of the Entitas::Component classes in the provided Entitas::Matcher instances to merge

m1 = Entitas::Matcher.new.all_of(A)
m2 = Entitas::Matcher.new.all_of(B)
matcher = Entitas::Matcher.new.all_of(m1, m2)
any_of(*comps : Entitas::Component::ComponentTypes) : IAnyOfMatcher

Create a matcher to match entities with "ANY" of the provided Entitas::Component classes

Entitas::Matcher.new.any_of(A, B)
any_of(*indices : Int32) : IAnyOfMatcher

Create a matcher to match entities that have "ANY" of the Entitas::Component classes in the provided Int32 indices to merge

Entitas::Matcher.new.any_of(0)
any_of(*indices : Entitas::Component::Index) : IAnyOfMatcher

Create a matcher to match entities that have "ANY" of the Entitas::Component classes in the provided Entitas::Component::Index indices to merge

Entitas::Matcher.new.any_of(Entitas::Component::Index::A)
any_of(*matchers : IMatcher) : IAnyOfMatcher

Create a matcher to match entities that have "ANY" of the Entitas::Component classes in the provided Entitas::Matcher instances to merge

m1 = Entitas::Matcher.new.any_of(A)
m2 = Entitas::Matcher.new.any_of(B)
matcher = Entitas::Matcher.new.any_of(m1, m2)
component_names
Source
component_names=(component_names : Array(String))
Source
indices
Source
matches?(entity : Entitas::Entity) : Bool
Source
none_of(*comps : Entitas::Component::ComponentTypes) : INoneOfMatcher

Create a matcher to match entities with "NONE" of the provided Entitas::Component classes

Entitas::Matcher.new.none_of(A, B)
none_of(*indices : Int32) : INoneOfMatcher

Create a matcher to match entities that have "NONE" of the Entitas::Component classes in the provided Int32 indices to merge

Entitas::Matcher.new.none_of(0)
none_of(*indices : Entitas::Component::Index) : INoneOfMatcher

Create a matcher to match entities that have "NONE" of the Entitas::Component classes in the provided Entitas::Component::Index indices to merge

Entitas::Matcher.new.none_of(Entitas::Component::Index::A)
none_of(*matchers : IMatcher) : INoneOfMatcher

Create a matcher to match entities that have "NONE" of the Entitas::Component classes in the provided Entitas::Matcher instances to merge

m1 = Entitas::Matcher.new.none_of(A)
m2 = Entitas::Matcher.new.none_of(B)
matcher = Entitas::Matcher.new.none_of(m1, m2)
removed
Source
to_json(json : JSON::Builder)
Source
to_s(io)
Source

Macros

gen_functions
Source

Nested types