aztecs-0.16.0: A modular game engine and Entity-Component-System (ECS) for Haskell.
Copyright(c) Matt Hunzinger 2025
LicenseBSD-style (see the LICENSE file in the distribution)
Maintainermatt@hunzinger.me
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Aztecs.ECS.World.Bundle

Description

 
Synopsis

Documentation

newtype BundleT (m :: Type -> Type) Source #

Bundle of components.

Constructors

BundleT 

Fields

Instances

Instances details
Monad m => MonoidDynamicBundle m (BundleT m) Source # 
Instance details

Defined in Aztecs.ECS.World.Bundle

Monad m => Monoid (BundleT m) Source # 
Instance details

Defined in Aztecs.ECS.World.Bundle

Methods

mempty :: BundleT m #

mappend :: BundleT m -> BundleT m -> BundleT m #

mconcat :: [BundleT m] -> BundleT m #

Monad m => Semigroup (BundleT m) Source # 
Instance details

Defined in Aztecs.ECS.World.Bundle

Methods

(<>) :: BundleT m -> BundleT m -> BundleT m #

sconcat :: NonEmpty (BundleT m) -> BundleT m #

stimes :: Integral b => b -> BundleT m -> BundleT m #

type Bundle = BundleT Identity Source #

Pure bundle of components.

class MonoidDynamicBundle (m :: Type -> Type) a where Source #

Monoid bundle of dynamic components.

Methods

dynBundle :: Component m c => ComponentID -> c -> a Source #

Add a component to the bundle by its ComponentID.

dynBundleUntracked :: Component m c => ComponentID -> c -> a Source #

Add a component to the bundle by its ComponentID without running lifecycle hooks.

Instances

Instances details
Monad m => MonoidDynamicBundle m (BundleT m) Source # 
Instance details

Defined in Aztecs.ECS.World.Bundle

Monad m => MonoidDynamicBundle m (DynamicBundle m) Source # 
Instance details

Defined in Aztecs.ECS.World.Bundle.Dynamic

bundle :: forall (m :: Type -> Type) a. Component m a => a -> BundleT m Source #

bundleUntracked :: forall (m :: Type -> Type) a. Component m a => a -> BundleT m Source #

Create a bundle that inserts without running lifecycle hooks.

runBundle :: forall (m :: Type -> Type). Monad m => BundleT m -> Components -> EntityID -> Archetype m -> (Components, Archetype m, Access m ()) Source #

Insert a bundle of components into an archetype.