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

Aztecs.ECS.View

Synopsis

Documentation

newtype View Source #

View into a World, containing a subset of archetypes.

Constructors

View 

Instances

Instances details
Monoid View Source # 
Instance details

Defined in Aztecs.ECS.View

Methods

mempty :: View #

mappend :: View -> View -> View #

mconcat :: [View] -> View #

Semigroup View Source # 
Instance details

Defined in Aztecs.ECS.View

Methods

(<>) :: View -> View -> View #

sconcat :: NonEmpty View -> View #

stimes :: Integral b => b -> View -> View #

Show View Source # 
Instance details

Defined in Aztecs.ECS.View

Methods

showsPrec :: Int -> View -> ShowS #

show :: View -> String #

showList :: [View] -> ShowS #

view :: Set ComponentID -> Archetypes -> View Source #

View into all archetypes containing the provided component IDs.

filterView :: Set ComponentID -> (Node -> Bool) -> Archetypes -> View Source #

View into all archetypes containing the provided component IDs and matching the provided predicate.

unview :: View -> Entities -> Entities Source #

"Un-view" a View back into a World.

allDyn :: i -> DynamicQuery i a -> View -> ([a], View) Source #

Query all matching entities in a View.

singleDyn :: i -> DynamicQuery i a -> View -> (Maybe a, View) Source #

Query all matching entities in a View.

readAllDyn :: i -> DynamicQueryReader i a -> View -> [a] Source #

Query all matching entities in a View.