aztecs-0.8.0: A modular game engine and Entity-Component-System (ECS) for Haskell.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Aztecs.ECS.System.Class

Documentation

class Arrow arr => ArrowSystem q arr | arr -> q where Source #

Minimal complete definition

map, filterMap, mapSingle, mapSingleMaybe

Methods

map :: q i a -> arr i [a] Source #

Query and update all matching entities.

map_ :: q i o -> arr i () Source #

Query and update all matching entities, ignoring the results.

filterMap :: q i a -> QueryFilter -> arr i [a] Source #

Map all matching entities with a QueryFilter, storing the updated entities.

mapSingle :: q i a -> arr i a Source #

Map a single matching entity, storing the updated components. If there are zero or multiple matching entities, an error will be thrown.

mapSingleMaybe :: q i a -> arr i (Maybe a) Source #

Instances

Instances details
Monad m => ArrowSystem Query (SystemT m) Source # 
Instance details

Defined in Aztecs.ECS.System

Methods

map :: Query i a -> SystemT m i [a] Source #

map_ :: Query i o -> SystemT m i () Source #

filterMap :: Query i a -> QueryFilter -> SystemT m i [a] Source #

mapSingle :: Query i a -> SystemT m i a Source #

mapSingleMaybe :: Query i a -> SystemT m i (Maybe a) Source #