| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.ECS.World.Insert
Synopsis
- data Exception' = Exception'
- insert :: HasCallStack => forall b. Bundle b => b -> Entity -> System ()
- getOrInsert :: (Updateable (Result qd), Bundle qd) => qd -> Entity -> System (Result qd)
- insertNew :: Bundle b => b -> Entity -> System ()
- insertIfNeq :: BundleEq b => b -> Entity -> System ()
- class Settable c i | c -> i where
- setInner :: c -> i -> System ()
- setIfNeqInner :: c -> i -> System ()
- class Settable' (isRel :: k) c i | isRel c -> i where
- setInner' :: c -> i -> System ()
- setIfNeqInner' :: c -> i -> System ()
- set :: Settable c i => c -> i -> System ()
- setIfNeq :: (Eq i, Settable c i) => c -> i -> System ()
- class Updateable' (flag :: k) r where
- updateInner' :: r -> System (Maybe r)
- class Updateable r where
- updateInner :: r -> System (Maybe r)
- update :: Updateable (Result c) => Result c -> System (Maybe (Result c))
- triggerInsertEvent :: ProcessedBundleData -> Entity -> System ()
- triggerInsertEventC :: ErasedComponent -> Entity -> System ()
- triggerInsertEventR :: ErasedComponent -> Entity -> Entity -> System ()
Documentation
data Exception' Source #
Constructors
| Exception' |
Instances
| Exception Exception' Source # | |
Defined in Mischief.ECS.World.Insert Methods toException :: Exception' -> SomeException # fromException :: SomeException -> Maybe Exception' # displayException :: Exception' -> String # backtraceDesired :: Exception' -> Bool # | |
| Show Exception' Source # | |
Defined in Mischief.ECS.World.Insert Methods showsPrec :: Int -> Exception' -> ShowS # show :: Exception' -> String # showList :: [Exception'] -> ShowS # | |
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.
getOrInsert :: (Updateable (Result qd), Bundle qd) => qd -> Entity -> System (Result qd) Source #
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.
class Settable' (isRel :: k) c i | isRel c -> i where Source #
class Updateable' (flag :: k) r where Source #
Methods
updateInner' :: r -> System (Maybe r) Source #
Instances
| Component c => Updateable' 'False (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Insert | |
| (Component c, IsComponentC c ~ HTrue) => Updateable' 'True (Result c) Source # | |
Defined in Mischief.ECS.World.Insert | |
class Updateable r where Source #
Methods
updateInner :: r -> System (Maybe r) Source #
Instances
| Updateable' (IsComp c) (Result c) => Updateable (Result c) Source # | |
Defined in Mischief.ECS.World.Insert | |
update :: Updateable (Result c) => Result c -> System (Maybe (Result c)) Source #
Update the value of a Result.
Useful if you've done changed to the component and want to grab the live value without re-querying.
triggerInsertEvent :: ProcessedBundleData -> Entity -> System () Source #
triggerInsertEventC :: ErasedComponent -> Entity -> System () Source #
triggerInsertEventR :: ErasedComponent -> Entity -> Entity -> System () Source #