Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Aztecs.ECS.World.Archetype
Synopsis
- data Archetype = Archetype {
- storages :: !(Map ComponentID DynamicStorage)
- entities :: !(Set EntityID)
- empty :: Archetype
- lookupComponent :: forall a. Component a => EntityID -> ComponentID -> Archetype -> Maybe a
- lookupStorage :: Component a => ComponentID -> Archetype -> Maybe (StorageT a)
- member :: ComponentID -> Archetype -> Bool
- remove :: EntityID -> Archetype -> (Map ComponentID Dynamic, Archetype)
- removeStorages :: EntityID -> Archetype -> (Map ComponentID DynamicStorage, Archetype)
- insertComponent :: forall a. Component a => EntityID -> ComponentID -> a -> Archetype -> Archetype
- insertAscList :: forall a. Component a => ComponentID -> [a] -> Archetype -> Archetype
Documentation
Constructors
Archetype | |
Fields
|
Instances
Generic Archetype Source # | |
Show Archetype Source # | |
NFData Archetype Source # | |
Defined in Aztecs.ECS.World.Archetype | |
type Rep Archetype Source # | |
Defined in Aztecs.ECS.World.Archetype type Rep Archetype = D1 ('MetaData "Archetype" "Aztecs.ECS.World.Archetype" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) (C1 ('MetaCons "Archetype" 'PrefixI 'True) (S1 ('MetaSel ('Just "storages") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map ComponentID DynamicStorage)) :*: S1 ('MetaSel ('Just "entities") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set EntityID)))) |
lookupComponent :: forall a. Component a => EntityID -> ComponentID -> Archetype -> Maybe a Source #
lookupStorage :: Component a => ComponentID -> Archetype -> Maybe (StorageT a) Source #
removeStorages :: EntityID -> Archetype -> (Map ComponentID DynamicStorage, Archetype) Source #
insertComponent :: forall a. Component a => EntityID -> ComponentID -> a -> Archetype -> Archetype Source #
insertAscList :: forall a. Component a => ComponentID -> [a] -> Archetype -> Archetype Source #
Insert a list of components into the archetype, sorted in ascending order by their EntityID
.