module ECS::AbstractFilter

Overview

General filter class, contain methods existing both in Filter (fully functional filter) and SimpleFilter (simple stack-allocated filter)

Direct including types

Defined in:

myecs.cr

Instance Method Summary

Instance Method Detail

def count_entities #

Returns number of entities that match the filter. Note that for MultipleComponents single entity will be counted multiple times, once for each component present on entity


[View source]
abstract def each_entity(& : Entity -> ) #

iterates over all entities that match the filter Note that for MultipleComponents same entity can be yielded multiple times, once for each component present on entity


[View source]
def find_entity? #

Returns some entity that match the filter or nil if there are no such entities


[View source]
abstract def satisfy(entity : Entity) : Bool #

returns true if entity satisfy filter


[View source]