pyecs.querying.Query#

class pyecs.querying.Query[source]#
__init__()[source]#

Methods

__init__()

execute(storage_or_world)

Execute the query on either a ComponentStorage or ECSWorld instance.

with_components(*types)

without_components(*types)

__init__()[source]#
with_components(*types)[source]#
Return type:

Query

Parameters:

types (type[TypeAliasForwardRef('pyecs.common.Types.Component')])

without_components(*types)[source]#
Return type:

Query

Parameters:

types (type[TypeAliasForwardRef('pyecs.common.Types.Component')])

execute(storage_or_world)[source]#

Execute the query on either a ComponentStorage or ECSWorld instance.

Return type:

list[pyecs.common.Types.Entity]

Parameters:

storage_or_world (ComponentStorage | ECSWorld)