module

Entitas::Helper::Entities(TEntity)

Instance methods

count

See size

Source
each
Source
get_entities

Returns all entities which are currently in the context.

Source
has_entity?(entity : TEntity) : Bool

Determines whether the context has the specified entity.

Source
size

Returns the total number of TEntity in this Group

Source
sort

Returns a new array with all elements sorted based on the comparator in the given block.

The block must implement a comparison between two elements a and b, where a < b returns -1, a == b returns 0, and a > b returns 1. The comparison operator <=> can be used for this.

a = [3, 1, 2]
b = a.sort { |a, b| b <=> a }

b # => [3, 2, 1]
a # => [3, 1, 2]
Source