mischief-ecs
Safe HaskellNone
LanguageGHC2024

Mischief.ECS.World.Insert

Synopsis

Documentation

insert :: HasCallStack => forall b. Bundle b => b -> Entity -> System () Source #

Insert a bundle of components on an Entity.

If the entity already contains these components, their values will be updated in-place instead of causing an archetype change.

insertNew :: Bundle b => b -> Entity -> System () Source #

Insert a bundle of components on an Entity.

Only the components that the entity doesn't already have will be inserted, and the rest ignored.