| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.ECS.World.Query
Documentation
findArchetypes :: forall qd m w output. (Queryable qd output, MonadSystem w m) => qd -> m [([ComponentId], ArchetypeId)] Source #
entityQuery :: forall qd output m w. (Queryable qd output, MonadSystem w m) => qd -> Entity -> m (Maybe output) Source #
class GetComponentId c where Source #
Methods
getComponentId' :: forall w (m :: Type -> Type). MonadSystem w m => c -> FilterComponent Source #
tryMetaLocal :: forall c m w. (Component c, MonadSystem w m) => m (Maybe Entity) Source #
addedChanged :: forall m w. MonadSystem w m => (ComponentTicks -> Tick -> Tick -> Bool) -> FilterComponent -> Entity -> m Bool Source #
added :: forall c m w. (MonadSystem w m, ToFilterComponent c) => c -> Entity -> m Bool Source #
changed :: forall c m w. (MonadSystem w m, ToFilterComponent c) => c -> Entity -> m Bool Source #
has :: forall c m w. (MonadSystem w m, ToFilterComponent c) => c -> Entity -> m Bool Source #
data Query (m :: Type -> Type) a where Source #
Constructors
| BuildQuery :: forall qd a (m :: Type -> Type). Queryable qd a => qd -> QueryFilter 'ArchetypeFilter -> Maybe [Entity] -> Query m a | |
| MapQuery :: forall (m :: Type -> Type) b a. Query m b -> (Entity -> b -> m a) -> Query m a | |
| FilterQuery :: forall (m :: Type -> Type) a. Query m a -> (Entity -> a -> m Bool) -> Query m a | |
| PairEntityQuery :: forall (m :: Type -> Type) a1. Query m a1 -> Query m (Entity, a1) | |
| DoQuery :: forall (m :: Type -> Type) a b. Query m a -> (Entity -> a -> m b) -> Query m a | |
| FoldQuery :: forall (m :: Type -> Type) a1 a. Query m a1 -> Entity -> (From a1 -> a -> a) -> a -> Query m a | |
| PureQuery :: forall a (m :: Type -> Type). a -> Query m a | |
| AppQuery :: forall (m :: Type -> Type) a1 a. Query m (a1 -> a) -> Query m a1 -> Query m a | |
| BindQuery :: forall (m :: Type -> Type) a1 a. Query m a1 -> (a1 -> Query m a) -> Query m a | |
| EmptyQuery :: forall (m :: Type -> Type) a. Query m a | |
| RefocusQuery :: forall (m :: Type -> Type) a. Query m a -> Entity -> Query m a |
Instances
| MonadSystem w m => Applicative (Query m) Source # | |
| MonadSystem w m => Functor (Query m) Source # | |
| MonadSystem w m => Monad (Query m) Source # | |
query :: MonadSystem w m => Query m out -> m [out] Source #
query_ :: MonadSystem w m => Query m out -> m () Source #
mkQuery' :: forall qd out (m :: Type -> Type). Queryable qd out => qd -> QueryFilter 'ArchetypeFilter -> Query m out Source #
mkGet :: forall qd out (m :: Type -> Type). Queryable qd out => Entity -> qd -> Query m out Source #
mkGet' :: forall qd out (m :: Type -> Type). Queryable qd out => Entity -> qd -> QueryFilter 'ArchetypeFilter -> Query m out Source #