Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Aztecs.ECS.World
Synopsis
- data World = World {
- entities :: Entities
- nextEntityId :: !EntityID
- empty :: World
- spawn :: Bundle -> World -> (EntityID, World)
- spawnWithArchetypeId :: forall a. Component a => ArchetypeID -> ComponentID -> a -> World -> (EntityID, World)
- spawnEmpty :: World -> (EntityID, World)
- insert :: forall a. Component a => EntityID -> a -> World -> World
- insertWithId :: Component a => EntityID -> ComponentID -> a -> World -> World
- lookup :: forall a. Component a => EntityID -> World -> Maybe a
- remove :: forall a. Component a => EntityID -> World -> (Maybe a, World)
- removeWithId :: forall a. Component a => EntityID -> ComponentID -> World -> (Maybe a, World)
- despawn :: EntityID -> World -> (Map ComponentID Dynamic, World)
Documentation
World of entities and their components.
Constructors
World | |
Fields
|
Instances
Generic World Source # | |
Show World Source # | |
NFData World Source # | |
Defined in Aztecs.ECS.World | |
type Rep World Source # | |
Defined in Aztecs.ECS.World type Rep World = D1 ('MetaData "World" "Aztecs.ECS.World" "aztecs-0.8.0-5YWGoxTs0Vw9iciqZAe9GO" 'False) (C1 ('MetaCons "World" 'PrefixI 'True) (S1 ('MetaSel ('Just "entities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Entities) :*: S1 ('MetaSel ('Just "nextEntityId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EntityID))) |
spawnWithArchetypeId :: forall a. Component a => ArchetypeID -> ComponentID -> a -> World -> (EntityID, World) Source #
Spawn an entity with a component and its ComponentID
directly into an archetype.
insert :: forall a. Component a => EntityID -> a -> World -> World Source #
Insert a component into an entity.
insertWithId :: Component a => EntityID -> ComponentID -> a -> World -> World Source #
Insert a component into an entity with its ComponentID
.
remove :: forall a. Component a => EntityID -> World -> (Maybe a, World) Source #
Insert a component into an entity.
removeWithId :: forall a. Component a => EntityID -> ComponentID -> World -> (Maybe a, World) Source #