| Copyright | (c) Matt Hunzinger 2025 |
|---|---|
| License | BSD-style (see the LICENSE file in the distribution) |
| Maintainer | matt@hunzinger.me |
| Stability | provisional |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Aztecs.ECS.System.Dynamic
Contents
Description
Synopsis
- data DynamicSystem (m :: Type -> Type) a where
- Pure :: forall a (m :: Type -> Type). a -> DynamicSystem m a
- Map :: forall b a (m :: Type -> Type). (b -> a) -> DynamicSystem m b -> DynamicSystem m a
- Ap :: forall (m :: Type -> Type) b a. DynamicSystem m (b -> a) -> DynamicSystem m b -> DynamicSystem m a
- Op :: forall (m :: Type -> Type) a. Set ComponentID -> Op m a -> DynamicSystem m a
- runDynamicSystem :: Monad m => DynamicSystem m a -> Entities m -> m (a, Entities m, Access m ())
- runQuery :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Vector a)
- runQueryFiltered :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> (Node m -> Bool) -> DynamicSystem m (Vector a)
- runQuerySingle :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m a
- runQuerySingleMaybe :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Maybe a)
- readQuery :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Vector a)
- readQueryFiltered :: forall (m :: Type -> Type) a. Set ComponentID -> (Node m -> Bool) -> DynamicQuery m a -> DynamicSystem m (Vector a)
- readQuerySingle :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m a
- readQuerySingleMaybe :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Maybe a)
Dynamic systems
data DynamicSystem (m :: Type -> Type) a where Source #
Dynamic system.
Constructors
| Pure :: forall a (m :: Type -> Type). a -> DynamicSystem m a | Pure value. |
| Map :: forall b a (m :: Type -> Type). (b -> a) -> DynamicSystem m b -> DynamicSystem m a | Functor map. |
| Ap :: forall (m :: Type -> Type) b a. DynamicSystem m (b -> a) -> DynamicSystem m b -> DynamicSystem m a | Applicative apply. |
| Op :: forall (m :: Type -> Type) a. Set ComponentID -> Op m a -> DynamicSystem m a | Query operation. |
Instances
| Applicative (DynamicSystem m) Source # | |
Defined in Aztecs.ECS.System.Dynamic Methods pure :: a -> DynamicSystem m a # (<*>) :: DynamicSystem m (a -> b) -> DynamicSystem m a -> DynamicSystem m b # liftA2 :: (a -> b -> c) -> DynamicSystem m a -> DynamicSystem m b -> DynamicSystem m c # (*>) :: DynamicSystem m a -> DynamicSystem m b -> DynamicSystem m b # (<*) :: DynamicSystem m a -> DynamicSystem m b -> DynamicSystem m a # | |
| Functor (DynamicSystem m) Source # | |
Defined in Aztecs.ECS.System.Dynamic Methods fmap :: (a -> b) -> DynamicSystem m a -> DynamicSystem m b # (<$) :: a -> DynamicSystem m b -> DynamicSystem m a # | |
runDynamicSystem :: Monad m => DynamicSystem m a -> Entities m -> m (a, Entities m, Access m ()) Source #
Run a dynamic system on entities, returning results, updated entities, and hooks to run.
Queries
runQuery :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Vector a) Source #
runQueryFiltered :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> (Node m -> Bool) -> DynamicSystem m (Vector a) Source #
runQuerySingle :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m a Source #
runQuerySingleMaybe :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Maybe a) Source #
readQuery :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Vector a) Source #
readQueryFiltered :: forall (m :: Type -> Type) a. Set ComponentID -> (Node m -> Bool) -> DynamicQuery m a -> DynamicSystem m (Vector a) Source #
readQuerySingle :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m a Source #
readQuerySingleMaybe :: forall (m :: Type -> Type) a. Set ComponentID -> DynamicQuery m a -> DynamicSystem m (Maybe a) Source #