| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.ECS.Components
Synopsis
- class (Typeable c, IsExclusive (IsExclusiveRel c)) => Component c where
- data ComponentId = ComponentId (# Word#, Maybe Entity #)
- data Exclusivity
- newtype ComponentArchetypes = ComponentArchetypes {
- inner :: Set ArchetypeId
- data ComponentPairs = ComponentPairs {
- any :: Set ArchetypeId
- pairs :: Map Entity (Set ArchetypeId)
- newtype DefaultValue = DefaultValue ErasedComponent
- data Requires = Requires
- data RequiredBy = RequiredBy
- data ComponentType where
- ComponentType :: forall c. Component c => Proxy c -> ComponentType
- data ErasedComponent where
- ErasedComponent :: forall c. Component c => c -> ErasedComponent
- tryGetComponent :: Component c => ErasedComponent -> Maybe c
- data DefaultComponentType where
- DefaultComponentType :: forall c. (Component c, Default c) => Proxy c -> DefaultComponentType
- newtype ArchetypeId = ArchetypeId {}
- data BundleData e = BundleData {
- elements :: Set (BundleElement e)
- resources :: Set (BundleElement e)
- external :: Set (Entity, BundleData e)
- data BundleElement e = BundleElement {
- rep :: ComponentRep
- component :: e
- data ComponentTicks = ComponentTicks {}
- data ComponentData = ComponentData {}
- newtype Components = Components {
- components :: HashMap TypeRep Word
- emptyComponents :: IO Components
- getComponentId :: TypeRep -> Components -> IO (Maybe ComponentId)
- newtype Pair = Pair (ComponentType, Entity)
- data Rel c = Rel {}
- data From c = From {}
- newtype Res c = Res {
- comp :: c
- data ComponentRep
- newtype Tick = Tick (Int, Int)
- data ErasedComponentEq where
- ErasedComponentEq :: forall c. (Component c, Eq c) => c -> ErasedComponentEq
- class IsExclusive (e :: Bool) where
- isExclusive :: Bool
- isPair :: ComponentId -> Bool
- setCompIdTarget :: Maybe Entity -> ComponentId -> ComponentId
- data IsExclusiveRelationship = IsExclusiveRelationship
Component
class (Typeable c, IsExclusive (IsExclusiveRel c)) => Component c where Source #
The Component typeclass.
Minimal complete definition
Nothing
Methods
required :: Set DefaultComponentType Source #
List of components required by this one.
All required components must be Default
Example
data A = A instanceComponentA whererequired=require@(B, C) data B = BIntderiving (Component,Generic,Default) data C = CStringderiving (Component) instanceDefaultC wheredef= C "Default String"
onAddRel :: [HookRel c] Source #
onSetRel :: [HookRel c] Source #
onRemoveRel :: [HookRel c] Source #
Instances
data ComponentId Source #
Unique id for components and component pairs.
Constructors
| ComponentId (# Word#, Maybe Entity #) |
Instances
| Eq ComponentId Source # | |
Defined in Mischief.ECS.Components | |
| Ord ComponentId Source # | |
Defined in Mischief.ECS.Components Methods compare :: ComponentId -> ComponentId -> Ordering # (<) :: ComponentId -> ComponentId -> Bool # (<=) :: ComponentId -> ComponentId -> Bool # (>) :: ComponentId -> ComponentId -> Bool # (>=) :: ComponentId -> ComponentId -> Bool # max :: ComponentId -> ComponentId -> ComponentId # min :: ComponentId -> ComponentId -> ComponentId # | |
data Exclusivity Source #
Meta
newtype ComponentArchetypes Source #
Meta component with a set of all archetypes that a components is part of.
Constructors
| ComponentArchetypes | |
Fields
| |
Instances
| Default ComponentArchetypes Source # | |||||
Defined in Mischief.ECS.Components Methods | |||||
| Show ComponentArchetypes Source # | |||||
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> ComponentArchetypes -> ShowS # show :: ComponentArchetypes -> String # showList :: [ComponentArchetypes] -> ShowS # | |||||
| Component ComponentArchetypes Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods required :: Set DefaultComponentType Source # onAdd :: [Hook ComponentArchetypes] Source # onSet :: [Hook ComponentArchetypes] Source # onRemove :: [Hook ComponentArchetypes] Source # onAddRel :: [HookRel ComponentArchetypes] Source # | |||||
| type IsExclusiveRel ComponentArchetypes Source # | |||||
Defined in Mischief.ECS.Components | |||||
data ComponentPairs Source #
Meta component with a set of all archetypes containing pairs made with this component.
Constructors
| ComponentPairs | |
Fields
| |
Instances
| Default ComponentPairs Source # | |||||
Defined in Mischief.ECS.Components Methods def :: ComponentPairs # | |||||
| Generic ComponentPairs Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods from :: ComponentPairs -> Rep ComponentPairs x # to :: Rep ComponentPairs x -> ComponentPairs # | |||||
| Show ComponentPairs Source # | |||||
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> ComponentPairs -> ShowS # show :: ComponentPairs -> String # showList :: [ComponentPairs] -> ShowS # | |||||
| Component ComponentPairs Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods required :: Set DefaultComponentType Source # onAdd :: [Hook ComponentPairs] Source # onSet :: [Hook ComponentPairs] Source # onRemove :: [Hook ComponentPairs] Source # onAddRel :: [HookRel ComponentPairs] Source # onSetRel :: [HookRel ComponentPairs] Source # | |||||
| type Rep ComponentPairs Source # | |||||
Defined in Mischief.ECS.Components type Rep ComponentPairs = D1 ('MetaData "ComponentPairs" "Mischief.ECS.Components" "mischief-ecs-0.2.0.0-inplace" 'False) (C1 ('MetaCons "ComponentPairs" 'PrefixI 'True) (S1 ('MetaSel ('Just "any") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set ArchetypeId)) :*: S1 ('MetaSel ('Just "pairs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Entity (Set ArchetypeId))))) | |||||
| type IsExclusiveRel ComponentPairs Source # | |||||
Defined in Mischief.ECS.Components | |||||
newtype DefaultValue Source #
Meta component with the erased default value of this component. Added to components required by other components.
Constructors
| DefaultValue ErasedComponent |
Instances
| Component DefaultValue Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods required :: Set DefaultComponentType Source # onAdd :: [Hook DefaultValue] Source # onSet :: [Hook DefaultValue] Source # onRemove :: [Hook DefaultValue] Source # onAddRel :: [HookRel DefaultValue] Source # onSetRel :: [HookRel DefaultValue] Source # | |||||
| type IsExclusiveRel DefaultValue Source # | |||||
Defined in Mischief.ECS.Components | |||||
Meta relationship.
Constructors
| Requires |
Instances
| Component Requires Source # | |||||
Defined in Mischief.ECS.Components Associated Types
| |||||
| type IsExclusiveRel Requires Source # | |||||
Defined in Mischief.ECS.Components | |||||
data RequiredBy Source #
Meta relationship.
Constructors
| RequiredBy |
Instances
| Component RequiredBy Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods required :: Set DefaultComponentType Source # onAdd :: [Hook RequiredBy] Source # onSet :: [Hook RequiredBy] Source # onRemove :: [Hook RequiredBy] Source # onAddRel :: [HookRel RequiredBy] Source # onSetRel :: [HookRel RequiredBy] Source # onRemoveRel :: [HookRel RequiredBy] Source # | |||||
| type IsExclusiveRel RequiredBy Source # | |||||
Defined in Mischief.ECS.Components | |||||
data ComponentType where Source #
Constructors
| ComponentType :: forall c. Component c => Proxy c -> ComponentType |
Instances
| Show ComponentType Source # | |||||
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> ComponentType -> ShowS # show :: ComponentType -> String # showList :: [ComponentType] -> ShowS # | |||||
| Eq ComponentType Source # | |||||
Defined in Mischief.ECS.Components Methods (==) :: ComponentType -> ComponentType -> Bool # (/=) :: ComponentType -> ComponentType -> Bool # | |||||
| Ord ComponentType Source # | |||||
Defined in Mischief.ECS.Components Methods compare :: ComponentType -> ComponentType -> Ordering # (<) :: ComponentType -> ComponentType -> Bool # (<=) :: ComponentType -> ComponentType -> Bool # (>) :: ComponentType -> ComponentType -> Bool # (>=) :: ComponentType -> ComponentType -> Bool # max :: ComponentType -> ComponentType -> ComponentType # min :: ComponentType -> ComponentType -> ComponentType # | |||||
| Component ComponentType Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods required :: Set DefaultComponentType Source # onAdd :: [Hook ComponentType] Source # onSet :: [Hook ComponentType] Source # onRemove :: [Hook ComponentType] Source # onAddRel :: [HookRel ComponentType] Source # onSetRel :: [HookRel ComponentType] Source # | |||||
| GetRep ComponentType Source # | |||||
Defined in Mischief.ECS.Components Methods getRep :: ComponentType -> TypeRep Source # | |||||
| type IsExclusiveRel ComponentType Source # | |||||
Defined in Mischief.ECS.Components | |||||
Erasure
data ErasedComponent where Source #
Type for component erasure.
Constructors
| ErasedComponent :: forall c. Component c => c -> ErasedComponent |
Instances
| GetRep ErasedComponent Source # | |
Defined in Mischief.ECS.Components Methods getRep :: ErasedComponent -> TypeRep Source # | |
| EraseIntoStorage () (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: () -> BundleData ErasedComponent Source # | |
| Component c => EraseIntoStorage c (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: c -> BundleData ErasedComponent Source # | |
| EraseIntoStorage (BundleData ErasedComponent) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: BundleData ErasedComponent -> BundleData ErasedComponent Source # | |
| Collectable c (BundleData ErasedComponent) => EraseIntoStorage (From c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: From c -> BundleData ErasedComponent Source # | |
| Component c => EraseIntoStorage (Rel c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Rel c -> BundleData ErasedComponent Source # | |
| Component c => EraseIntoStorage (Res c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Res c -> BundleData ErasedComponent Source # | |
| Collectable c (BundleData ErasedComponent) => EraseIntoStorage [c] (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: [c] -> BundleData ErasedComponent Source # | |
tryGetComponent :: Component c => ErasedComponent -> Maybe c Source #
Try to get the inner data of a ErasedComponent.
data DefaultComponentType where Source #
Constructors
| DefaultComponentType :: forall c. (Component c, Default c) => Proxy c -> DefaultComponentType |
Instances
| Show DefaultComponentType Source # | |
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> DefaultComponentType -> ShowS # show :: DefaultComponentType -> String # showList :: [DefaultComponentType] -> ShowS # | |
| Eq DefaultComponentType Source # | |
Defined in Mischief.ECS.Components Methods (==) :: DefaultComponentType -> DefaultComponentType -> Bool # (/=) :: DefaultComponentType -> DefaultComponentType -> Bool # | |
| Ord DefaultComponentType Source # | |
Defined in Mischief.ECS.Components Methods compare :: DefaultComponentType -> DefaultComponentType -> Ordering # (<) :: DefaultComponentType -> DefaultComponentType -> Bool # (<=) :: DefaultComponentType -> DefaultComponentType -> Bool # (>) :: DefaultComponentType -> DefaultComponentType -> Bool # (>=) :: DefaultComponentType -> DefaultComponentType -> Bool # max :: DefaultComponentType -> DefaultComponentType -> DefaultComponentType # min :: DefaultComponentType -> DefaultComponentType -> DefaultComponentType # | |
| GetRep DefaultComponentType Source # | |
Defined in Mischief.ECS.Components Methods getRep :: DefaultComponentType -> TypeRep Source # | |
Archetypes
newtype ArchetypeId Source #
Unique id corresponding to an archetype.
Constructors
| ArchetypeId | |
Instances
| Show ArchetypeId Source # | |
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> ArchetypeId -> ShowS # show :: ArchetypeId -> String # showList :: [ArchetypeId] -> ShowS # | |
| Eq ArchetypeId Source # | |
Defined in Mischief.ECS.Components | |
| Ord ArchetypeId Source # | |
Defined in Mischief.ECS.Components Methods compare :: ArchetypeId -> ArchetypeId -> Ordering # (<) :: ArchetypeId -> ArchetypeId -> Bool # (<=) :: ArchetypeId -> ArchetypeId -> Bool # (>) :: ArchetypeId -> ArchetypeId -> Bool # (>=) :: ArchetypeId -> ArchetypeId -> Bool # max :: ArchetypeId -> ArchetypeId -> ArchetypeId # min :: ArchetypeId -> ArchetypeId -> ArchetypeId # | |
Bundles
data BundleData e Source #
Data extracted from a Bundle.
Constructors
| BundleData | |
Fields
| |
Instances
| EraseIntoStorage () (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: () -> BundleData ErasedComponent Source # | |
| Component c => EraseIntoStorage c (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: c -> BundleData ErasedComponent Source # | |
| (Component c, Eq c) => EraseIntoStorage c (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: c -> BundleData ErasedComponentEq Source # | |
| Semigroup (BundleData e) Source # | |
Defined in Mischief.ECS.Components Methods (<>) :: BundleData e -> BundleData e -> BundleData e # sconcat :: NonEmpty (BundleData e) -> BundleData e # stimes :: Integral b => b -> BundleData e -> BundleData e # | |
| Show (BundleData e) Source # | |
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> BundleData e -> ShowS # show :: BundleData e -> String # showList :: [BundleData e] -> ShowS # | |
| Eq (BundleData e) Source # | |
Defined in Mischief.ECS.Components | |
| Ord (BundleData e) Source # | |
Defined in Mischief.ECS.Components Methods compare :: BundleData e -> BundleData e -> Ordering # (<) :: BundleData e -> BundleData e -> Bool # (<=) :: BundleData e -> BundleData e -> Bool # (>) :: BundleData e -> BundleData e -> Bool # (>=) :: BundleData e -> BundleData e -> Bool # max :: BundleData e -> BundleData e -> BundleData e # min :: BundleData e -> BundleData e -> BundleData e # | |
| EraseIntoStorage (BundleData ErasedComponent) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: BundleData ErasedComponent -> BundleData ErasedComponent Source # | |
| EraseIntoStorage (BundleData ErasedComponentEq) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: BundleData ErasedComponentEq -> BundleData ErasedComponentEq Source # | |
| Collectable c (BundleData ErasedComponent) => EraseIntoStorage (From c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: From c -> BundleData ErasedComponent Source # | |
| Collectable c (BundleData ErasedComponentEq) => EraseIntoStorage (From c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: From c -> BundleData ErasedComponentEq Source # | |
| Component c => EraseIntoStorage (Rel c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Rel c -> BundleData ErasedComponent Source # | |
| (Component c, Eq c) => EraseIntoStorage (Rel c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Rel c -> BundleData ErasedComponentEq Source # | |
| Component c => EraseIntoStorage (Res c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Res c -> BundleData ErasedComponent Source # | |
| (Component c, Eq c) => EraseIntoStorage (Res c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Res c -> BundleData ErasedComponentEq Source # | |
| Collectable c (BundleData ErasedComponent) => EraseIntoStorage [c] (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: [c] -> BundleData ErasedComponent Source # | |
| Collectable c (BundleData ErasedComponentEq) => EraseIntoStorage [c] (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: [c] -> BundleData ErasedComponentEq Source # | |
data BundleElement e Source #
Element of a 'BundleData e'.
Constructors
| BundleElement | |
Fields
| |
Instances
| Show (BundleElement a) Source # | |
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> BundleElement a -> ShowS # show :: BundleElement a -> String # showList :: [BundleElement a] -> ShowS # | |
| Eq (BundleElement a) Source # | |
Defined in Mischief.ECS.Components Methods (==) :: BundleElement a -> BundleElement a -> Bool # (/=) :: BundleElement a -> BundleElement a -> Bool # | |
| Ord (BundleElement a) Source # | |
Defined in Mischief.ECS.Components Methods compare :: BundleElement a -> BundleElement a -> Ordering # (<) :: BundleElement a -> BundleElement a -> Bool # (<=) :: BundleElement a -> BundleElement a -> Bool # (>) :: BundleElement a -> BundleElement a -> Bool # (>=) :: BundleElement a -> BundleElement a -> Bool # max :: BundleElement a -> BundleElement a -> BundleElement a # min :: BundleElement a -> BundleElement a -> BundleElement a # | |
Tables
data ComponentTicks Source #
Change ticks for a specific component.
Constructors
| ComponentTicks | |
Instances
| Show ComponentTicks Source # | |
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> ComponentTicks -> ShowS # show :: ComponentTicks -> String # showList :: [ComponentTicks] -> ShowS # | |
data ComponentData Source #
Data for a component that's stored in a table.
Constructors
| ComponentData | |
Fields | |
Storage
newtype Components Source #
Contains data and methods for assigning ComponentIds to new components (via their TypeRep).
Constructors
| Components | |
Fields
| |
emptyComponents :: IO Components Source #
Construct an empty Components.
getComponentId :: TypeRep -> Components -> IO (Maybe ComponentId) Source #
Get the id of a component through IO.
Utils
Type used for querying and inserting relationships.
Instances
| Functor Rel Source # | |
| Component c => RelQuery 'False (MR c Any) (Maybe [Rel c]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'False (R c Any) [Rel c] Source # | |
| Component c => RelQuery 'True (MR c Any) (Maybe (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'True (R c Any) (Rel c) Source # | |
| Show c => Show (Rel c) Source # | |
| Eq c => Eq (Rel c) Source # | |
| Component c => EraseIntoStorage (Rel c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Rel c -> BundleData ErasedComponent Source # | |
| (Component c, Eq c) => EraseIntoStorage (Rel c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Rel c -> BundleData ErasedComponentEq Source # | |
| Component c => Queryable (MR c Entity) (Maybe (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => Queryable (R c Entity) (Rel c) Source # | |
Instances
| Functor From Source # | |
| (Component c, Queryable q out) => RelQuery 'False (MR c (Q q)) (Maybe [From out]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'False (MR c (Q' q (QueryFilter 'ArchetypeFilter))) (Maybe [From out]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable Methods relRunQueryEntity :: MR c (Q' q (QueryFilter 'ArchetypeFilter)) -> World -> Entity -> IO (Maybe (Maybe [From out])) Source # relRunQueryInternal :: MR c (Q' q (QueryFilter 'ArchetypeFilter)) -> [ArchetypeId] -> World -> IO [(Entity, Bool, Maybe [From out])] Source # relQueryTypes :: MR c (Q' q (QueryFilter 'ArchetypeFilter)) -> Set (TypeRep, TypeQuery) Source # | |
| (Component c, Queryable q out) => RelQuery 'False (R c (Q q)) [From out] Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'False (R c (Q' q (QueryFilter 'ArchetypeFilter))) [From out] Source # | |
Defined in Mischief.ECS.World.Query.Queryable Methods relRunQueryEntity :: R c (Q' q (QueryFilter 'ArchetypeFilter)) -> World -> Entity -> IO (Maybe [From out]) Source # relRunQueryInternal :: R c (Q' q (QueryFilter 'ArchetypeFilter)) -> [ArchetypeId] -> World -> IO [(Entity, Bool, [From out])] Source # relQueryTypes :: R c (Q' q (QueryFilter 'ArchetypeFilter)) -> Set (TypeRep, TypeQuery) Source # | |
| (Component c, Queryable q out) => RelQuery 'True (MR c (Q q)) (Maybe (From out)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'True (MR c (Q' q (QueryFilter 'ArchetypeFilter))) (Maybe (From out)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable Methods relRunQueryEntity :: MR c (Q' q (QueryFilter 'ArchetypeFilter)) -> World -> Entity -> IO (Maybe (Maybe (From out))) Source # relRunQueryInternal :: MR c (Q' q (QueryFilter 'ArchetypeFilter)) -> [ArchetypeId] -> World -> IO [(Entity, Bool, Maybe (From out))] Source # relQueryTypes :: MR c (Q' q (QueryFilter 'ArchetypeFilter)) -> Set (TypeRep, TypeQuery) Source # | |
| (Component c, Queryable q out) => RelQuery 'True (R c (Q q)) (From out) Source # | |
| (Component c, Queryable q out) => RelQuery 'True (R c (Q' q (QueryFilter 'ArchetypeFilter))) (From out) Source # | |
Defined in Mischief.ECS.World.Query.Queryable Methods relRunQueryEntity :: R c (Q' q (QueryFilter 'ArchetypeFilter)) -> World -> Entity -> IO (Maybe (From out)) Source # relRunQueryInternal :: R c (Q' q (QueryFilter 'ArchetypeFilter)) -> [ArchetypeId] -> World -> IO [(Entity, Bool, From out)] Source # relQueryTypes :: R c (Q' q (QueryFilter 'ArchetypeFilter)) -> Set (TypeRep, TypeQuery) Source # | |
| Show c => Show (From c) Source # | |
| Eq c => Eq (From c) Source # | |
| Collectable c (BundleData ErasedComponent) => EraseIntoStorage (From c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: From c -> BundleData ErasedComponent Source # | |
| Collectable c (BundleData ErasedComponentEq) => EraseIntoStorage (From c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: From c -> BundleData ErasedComponentEq Source # | |
Instances
| Functor Res Source # | |
| Show c => Show (Res c) Source # | |
| Eq c => Eq (Res c) Source # | |
| Component c => EraseIntoStorage (Res c) (BundleData ErasedComponent) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Res c -> BundleData ErasedComponent Source # | |
| (Component c, Eq c) => EraseIntoStorage (Res c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Res c -> BundleData ErasedComponentEq Source # | |
| Component c => Queryable (MRes c) (Maybe (Res c)) Source # | |
| Component c => Queryable (c -> Res c) (Res c) Source # | |
data ComponentRep Source #
Constructors
| ComponentRep ComponentType | |
| PairRep (ComponentType, Entity) |
Instances
| Show ComponentRep Source # | |
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> ComponentRep -> ShowS # show :: ComponentRep -> String # showList :: [ComponentRep] -> ShowS # | |
| Eq ComponentRep Source # | |
Defined in Mischief.ECS.Components | |
| Ord ComponentRep Source # | |
Defined in Mischief.ECS.Components Methods compare :: ComponentRep -> ComponentRep -> Ordering # (<) :: ComponentRep -> ComponentRep -> Bool # (<=) :: ComponentRep -> ComponentRep -> Bool # (>) :: ComponentRep -> ComponentRep -> Bool # (>=) :: ComponentRep -> ComponentRep -> Bool # max :: ComponentRep -> ComponentRep -> ComponentRep # min :: ComponentRep -> ComponentRep -> ComponentRep # | |
data ErasedComponentEq where Source #
Constructors
| ErasedComponentEq :: forall c. (Component c, Eq c) => c -> ErasedComponentEq |
Instances
| (Component c, Eq c) => EraseIntoStorage c (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: c -> BundleData ErasedComponentEq Source # | |
| EraseIntoStorage (BundleData ErasedComponentEq) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: BundleData ErasedComponentEq -> BundleData ErasedComponentEq Source # | |
| Collectable c (BundleData ErasedComponentEq) => EraseIntoStorage (From c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: From c -> BundleData ErasedComponentEq Source # | |
| (Component c, Eq c) => EraseIntoStorage (Rel c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Rel c -> BundleData ErasedComponentEq Source # | |
| (Component c, Eq c) => EraseIntoStorage (Res c) (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: Res c -> BundleData ErasedComponentEq Source # | |
| Collectable c (BundleData ErasedComponentEq) => EraseIntoStorage [c] (BundleData ErasedComponentEq) Source # | |
Defined in Mischief.ECS.Components Methods erase :: [c] -> BundleData ErasedComponentEq Source # | |
class IsExclusive (e :: Bool) where Source #
Methods
isExclusive :: Bool Source #
Instances
| IsExclusive 'False Source # | |
Defined in Mischief.ECS.Components Methods isExclusive :: Bool Source # | |
| IsExclusive 'True Source # | |
Defined in Mischief.ECS.Components Methods isExclusive :: Bool Source # | |
isPair :: ComponentId -> Bool Source #
setCompIdTarget :: Maybe Entity -> ComponentId -> ComponentId Source #
data IsExclusiveRelationship Source #
Constructors
| IsExclusiveRelationship |
Instances
| Show IsExclusiveRelationship Source # | |||||
Defined in Mischief.ECS.Components Methods showsPrec :: Int -> IsExclusiveRelationship -> ShowS # show :: IsExclusiveRelationship -> String # showList :: [IsExclusiveRelationship] -> ShowS # | |||||
| Component IsExclusiveRelationship Source # | |||||
Defined in Mischief.ECS.Components Associated Types
Methods required :: Set DefaultComponentType Source # onAdd :: [Hook IsExclusiveRelationship] Source # onSet :: [Hook IsExclusiveRelationship] Source # onRemove :: [Hook IsExclusiveRelationship] Source # onAddRel :: [HookRel IsExclusiveRelationship] Source # | |||||
| type IsExclusiveRel IsExclusiveRelationship Source # | |||||
Defined in Mischief.ECS.Components | |||||