Run a system in a game world
Moduleapecs-0.9.6Haskell2010
Apecs.System
- 17 values
- Packageapecs-0.9.6
- Exports17
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceSystem.hs
Run a system in a game world
Read a Component
Writes a Component to a given Entity. Will overwrite existing Components.
Writes a Component to a given Entity. Will overwrite existing Components.
set operator
Returns whether the given entity has component c
Destroys component c for the given entity.
Applies a function, if possible.
Applies a function, if possible.
modify operator
Maps a function over all entities with a cx, and writes their cy.
Conditional cmap, that first tests whether the argument satisfies some property.
The entity needs to have both a cx and cp component.
Monadically iterates over all entites with a cx, and writes their cy.
Monadically iterates over all entites with a cx
Fold over the game world; for example, cfold max (minBound :: Foo) will find the maximum value of Foo.
Strict in the accumulator.
Monadically fold over the game world. Strict in the accumulator.
Monadically fold over the game world. Strict in the accumulator.
Collect matching components into a list by using the specified test/process function.
You can use this to preprocess data before returning.
And you can do a test here that depends on data from multiple components.
Pass Just to simply collect all the items.