| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Mischief.ECS.Prelude
Synopsis
- class (Typeable c, IsExclusive (RelExclusivity c)) => Component c where
- type RelExclusivity c :: Exclusivity
- required :: Set DefaultComponentType
- hooks :: Hooks c
- data Exclusivity
- data Rel c = Rel {}
- type family RelExclusivity c :: Exclusivity
- require :: forall {k} (b :: k). RequiredBundle b => Set DefaultComponentType
- module Mischief.ECS.Components.Common
- data Entity
- get :: forall qd m w out. (Queryable qd out, MonadSystem w m) => qd -> Entity -> m (Maybe out)
- get' :: forall qd m w out qf. (Queryable qd out, MonadSystem w m, Collectable qf QueryFilter) => qd -> qf -> Entity -> m (Maybe out)
- query :: forall qd output m w. (Queryable qd output, MonadSystem w m) => qd -> m [output]
- query' :: forall qd m w out qf. (Queryable qd out, MonadSystem w m, Collectable qf QueryFilter) => qd -> qf -> m [out]
- single :: forall qd m w out. (Queryable qd out, MonadSystem w m) => qd -> m (Maybe out)
- single' :: forall qd m w out qf. (Queryable qd out, MonadSystem w m, Collectable qf QueryFilter) => qd -> qf -> m (Maybe out)
- (|.) :: a -> b -> Or a b
- newtype Added c = Added c
- newtype Changed c = Changed c
- newtype Check c = Check (c -> Bool)
- data CheckR e c = CheckR e (c -> Bool)
- newtype Not c = Not c
- newtype With c = With c
- newtype Without c = Without c
- data Any = Any
- data C (a :: k) = C
- data E = E
- data Has (a :: k) = Has
- newtype HasR (a :: k) b = HasR b
- data M (a :: k) = M
- newtype MR (a :: k) b = MR b
- newtype Q a = Q a
- newtype R (a :: k) b = R b
- newtype Val a = Val a
- module Mischief.ECS.World.Query.TH
- insert :: HasCallStack => forall b. Bundle b => b -> Entity -> System ()
- insertIfNeq :: BundleEq b => b -> Entity -> System ()
- insertNew :: Bundle b => b -> Entity -> System ()
- set :: Settable c i => c -> i -> System ()
- setIfNeq :: (Eq i, Settable c i) => c -> i -> System ()
- update :: Updateable (Result c) => Result c -> System (Maybe (Result c))
- remove :: Collectable c ToRemove => c -> Entity -> System ()
- modify :: (Updateable (Result c), Settable (Result c) i, DeepValue (Result c) i) => Result c -> (i -> i) -> System ()
- modify' :: (Settable (Result c) i, DeepValue (Result c) i) => Result c -> (i -> i) -> System ()
- despawn :: Entity -> System ()
- spawn :: (HasCallStack, Bundle b) => b -> System Entity
- spawnDefer :: Bundle b => b -> ParSystem Entity
- module Mischief.ECS.Resources
- class Typeable e => Event e
- data System a
- deltaSecs :: Time -> Float
- deltaTime :: System Float
- data Time
- data TimePlugin = TimePlugin
- delay :: MonadSystem w m => Int -> System () -> m ()
- runAfter :: MonadSystem w m => IO a -> (a -> System ()) -> m ()
- defer :: Defer m => System a -> m ()
- newApp :: Plugin p => p -> IO App
- runApp :: App -> IO ()
- plug :: Collectable p Plugins => p -> Plugins
- class (Typeable p, Eq p) => Plugin p where
- data First = First
- data PostStartup = PostStartup
- data PostUpdate = PostUpdate
- data PreStartup = PreStartup
- data PreUpdate = PreUpdate
- data Startup = Startup
- data Update = Update
- after :: s1 -> System () -> SystemConfigModifier s1 (System ())
- before :: s1 -> System () -> SystemConfigModifier s1 (System ())
- module Mischief.ECS.Log
- unwrap :: HasCallStack => Maybe a -> a
- expect :: HasCallStack => forall (m :: Type -> Type) w a. MonadSystem w m => Text -> Maybe a -> m a
- trigger :: Event e => e -> System ()
- module Mischief.ECS.World.Query.QueryType
Documentation
class (Typeable c, IsExclusive (RelExclusivity c)) => Component c where Source #
The Component typeclass.
Minimal complete definition
Nothing
Methods
Instances
data Exclusivity Source #
Type used for querying and inserting relationships.
Instances
| Component c => Updateable' 'False (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Insert | |
| Component c => GetResultComponentId' 'False (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query Methods getResultComponentId' :: MonadSystem w m => Result (Rel c) -> m (Maybe ComponentId) Source # | |
| DeepValue' 'False (Result (Rel c)) c Source # | |
Defined in Mischief.ECS.Tables Methods deepValue' :: Result (Rel c) -> c Source # | |
| Component c => Settable' 'False (Result (Rel c)) c Source # | |
| Component c => RelQuery 'Exclusive (MR c Any) (Maybe (Result (Rel c))) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Exclusive (R c Any) (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Inclusive (MR c Any) (Maybe [Result (Rel c)]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Inclusive (R c Any) [Result (Rel c)] Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Show c => Show (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 (Result (Rel c))) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => Queryable (R c Entity) (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
type family RelExclusivity c :: Exclusivity Source #
Instances
| type RelExclusivity ScheduleLabel Source # | |
Defined in Mischief.ECS.App.Schedules | |
| type RelExclusivity Schedules Source # | |
Defined in Mischief.ECS.App.Schedules | |
| type RelExclusivity StartupSchedule Source # | |
Defined in Mischief.ECS.App.Schedules | |
| type RelExclusivity UpdateSchedule Source # | |
Defined in Mischief.ECS.App.Schedules | |
| type RelExclusivity LastSystemTick Source # | |
Defined in Mischief.ECS.App.SystemDef | |
| type RelExclusivity SystemTick Source # | |
Defined in Mischief.ECS.App.SystemDef | |
| type RelExclusivity ScheduledIn Source # | |
Defined in Mischief.ECS.App.Systems | |
| type RelExclusivity SystemFunction Source # | |
Defined in Mischief.ECS.App.Systems | |
| type RelExclusivity Systems Source # | |
Defined in Mischief.ECS.App.Systems | |
| type RelExclusivity ComponentArchetypes Source # | |
Defined in Mischief.ECS.Components | |
| type RelExclusivity ComponentPairs Source # | |
Defined in Mischief.ECS.Components | |
| type RelExclusivity ComponentType Source # | |
Defined in Mischief.ECS.Components | |
| type RelExclusivity DefaultValue Source # | |
Defined in Mischief.ECS.Components | |
| type RelExclusivity RequiredBy Source # | |
Defined in Mischief.ECS.Components | |
| type RelExclusivity Requires Source # | |
Defined in Mischief.ECS.Components | |
| type RelExclusivity Name Source # | |
Defined in Mischief.ECS.Components.Common | |
| type RelExclusivity ObserverOrder Source # | |
Defined in Mischief.ECS.Observer | |
| type RelExclusivity IsExclusiveRelationship Source # | |
Defined in Mischief.ECS.Relationships | |
| type RelExclusivity ChildOf Source # | |
Defined in Mischief.ECS.Relationships.ChildOf | |
| type RelExclusivity Before Source # | |
Defined in Mischief.ECS.Relationships.Order | |
| type RelExclusivity Visited Source # | |
Defined in Mischief.ECS.Relationships.Order | |
| type RelExclusivity Time Source # | |
Defined in Mischief.ECS.Time | |
| type RelExclusivity (Observer e) Source # | |
Defined in Mischief.ECS.Observer | |
| type RelExclusivity (EventProxy e) Source # | |
Defined in Mischief.ECS.Observer | |
| type RelExclusivity (TestG a b) Source # | |
Defined in Mischief.ECS.World.Query.TH.QD | |
require :: forall {k} (b :: k). RequiredBundle b => Set DefaultComponentType Source #
UNLIFTED
Points to an unique entity. The first Word# is an id, the second is a generation.
It is guaranteed that there can't be two alive entities with the same id.
Instances
| Show Entity Source # | |
| Eq Entity Source # | |
| Ord Entity Source # | |
| Queryable E Entity Source # | |
| Component c => IntoQueryFilter (CheckR Entity c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: CheckR Entity c -> QueryFilter Source # | |
| Component c => EraseIntoStorage (R c Entity, c -> Bool) CheckFilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => EraseIntoStorage (R c Entity) FilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => Queryable (HasR c Entity) Bool Source # | |
| Component c => Queryable (MR c Entity) (Maybe (Result (Rel c))) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => Queryable (R c Entity) (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
get :: forall qd m w out. (Queryable qd out, MonadSystem w m) => qd -> Entity -> m (Maybe out) Source #
get' :: forall qd m w out qf. (Queryable qd out, MonadSystem w m, Collectable qf QueryFilter) => qd -> qf -> Entity -> m (Maybe out) Source #
query :: forall qd output m w. (Queryable qd output, MonadSystem w m) => qd -> m [output] Source #
query' :: forall qd m w out qf. (Queryable qd out, MonadSystem w m, Collectable qf QueryFilter) => qd -> qf -> m [out] Source #
single' :: forall qd m w out qf. (Queryable qd out, MonadSystem w m, Collectable qf QueryFilter) => qd -> qf -> m (Maybe out) Source #
Constructors
| Added c |
Instances
| Collectable c FilterType => IntoQueryFilter (Added c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: Added c -> QueryFilter Source # | |
Constructors
| Changed c |
Instances
| Collectable c FilterType => IntoQueryFilter (Changed c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: Changed c -> QueryFilter Source # | |
Instances
| Component c => IntoQueryFilter (Check c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: Check c -> QueryFilter Source # | |
Instances
| Component c => IntoQueryFilter (CheckR Entity c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: CheckR Entity c -> QueryFilter Source # | |
| Component c => IntoQueryFilter (CheckR Any c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: CheckR Any c -> QueryFilter Source # | |
Constructors
| Not c |
Instances
| IntoQueryFilter q => IntoQueryFilter (Not q) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: Not q -> QueryFilter Source # | |
Constructors
| With c |
Instances
| Collectable c FilterType => IntoQueryFilter (With c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: With c -> QueryFilter Source # | |
Constructors
| Without c |
Instances
| Collectable c FilterType => IntoQueryFilter (Without c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: Without c -> QueryFilter Source # | |
Wildcard used when querying for relationships to indicate that you're querying for relationships with any target.
In the case of exclusive relationships, Any returns a single relationship rather than a list of relationships.
Constructors
| Any |
Instances
| Component c => RelQuery 'Exclusive (MR c Any) (Maybe (Result (Rel c))) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Exclusive (R c Any) (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Inclusive (MR c Any) (Maybe [Result (Rel c)]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Inclusive (R c Any) [Result (Rel c)] Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => IntoQueryFilter (CheckR Any c) Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods intoQueryFilter :: CheckR Any c -> QueryFilter Source # | |
| Component c => EraseIntoStorage (R c Any, c -> Bool) CheckFilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => EraseIntoStorage (R c Any) FilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => Queryable (HasR c Any) Bool Source # | |
| RelQuery (RelExclusivity c) (MR c Any) out => Queryable (MR c Any) out Source # | |
| RelQuery (RelExclusivity c) (R c Any) out => Queryable (R c Any) out Source # | |
Used to query for a component or to remove a component. Forces queries to only include entities which have the component.
Example
Querying:
x <- query (C @Name)
Removing:
remove (C @Name)
Quasi Notation
None, you just write the component name directly. For instance:
x <- [q|Name|]
Constructors
| C |
Instances
| Component c => EraseIntoStorage (C c) FilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter Methods erase :: C c -> FilterType Source # | |
| Component c => EraseIntoStorage (C c, c -> Bool) CheckFilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => Queryable (C c) (Result c) Source # | |
Used to query for the Entity.
Example
x <- query E
Quasi Notation
Entity
entity
E
e
For instance:
x <- [q|Entity|]
Constructors
| E |
Used in queries to return a Bool which indicates whether a component exists on the entity or not.
Example
x <- query (Has @Name)
Quasi Notation
Has
has
H
h
For instance:
x <- [q|Has Name|]
Constructors
| Has |
newtype HasR (a :: k) b Source #
Exactly like R, except that it returns a Bool depending on whether the entity has such a relationship or not.
Example
x <- query (HasR @Likes Any)
Quasi Notation
Has
has
H
h
For instance:
x <- [q|Has Likes -> *|]
Constructors
| HasR b |
Used to query for a component that an entity may or may not have.
Example
x <- query (M @Name)
Quasi Notation
Maybe
maybe
M
m
For instance:
x <- [q|Maybe Name|]
Constructors
| M |
newtype MR (a :: k) b Source #
Exactly like R, except that it wraps the result in a Maybe, also including entities that don't have such a relationship.
Example
x <- query (MR @Likes Any)
Quasi Notation
Maybe
maybe
M
m
For instance:
x <- [q|Maybe Likes -> *|]
Constructors
| MR b |
Instances
| Component c => RelQuery 'Exclusive (MR c Any) (Maybe (Result (Rel c))) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'Exclusive (MR c (Q q)) (Maybe out) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out, Collectable f QueryFilter) => RelQuery 'Exclusive (MR c (Q' q f)) (Maybe out) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Inclusive (MR c Any) (Maybe [Result (Rel c)]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'Inclusive (MR c (Q q)) (Maybe [out]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out, Collectable f QueryFilter) => RelQuery 'Inclusive (MR c (Q' q f)) (Maybe [out]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| RelQuery (RelExclusivity c) (MR c Any) out => Queryable (MR c Any) out Source # | |
| RelQuery (RelExclusivity c) (MR c (Q q)) out => Queryable (MR c (Q q)) out Source # | |
| RelQuery (RelExclusivity c) (MR c (Q' q f)) out => Queryable (MR c (Q' q f)) out Source # | |
| Component c => Queryable (MR c Entity) (Maybe (Result (Rel c))) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
Used when writing transitive queries. See R.
Constructors
| Q a |
Instances
| (Component c, Queryable q out) => RelQuery 'Exclusive (R c (Q q)) out Source # | |
| (Component c, Queryable q out) => RelQuery 'Exclusive (MR c (Q q)) (Maybe out) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'Inclusive (MR c (Q q)) (Maybe [out]) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'Inclusive (R c (Q q)) [out] Source # | |
| (Component c, Queryable q out) => Queryable (HasR c (Q q)) Bool Source # | |
| RelQuery (RelExclusivity c) (MR c (Q q)) out => Queryable (MR c (Q q)) out Source # | |
| RelQuery (RelExclusivity c) (R c (Q q)) out => Queryable (R c (Q q)) out Source # | |
Used to query for a relationships. Can be used in three different ways:
1. R c e
Queries for a relationship with a specific target. Forces queries to only include entities which have such a relationship.
Example
x <- query (R @Likes alice)
x :: [Result (Rel Likes)]
Quasi Notation
It is written with an arrow like so:
x <- [q|Likes -> alice|]
2. R c Any
Queries for all relationships with any target. Forces queries to only include entities which have at least one such relationship.
Example
x <- query (R @Likes Any)
x :: [[Result (Rel Likes)]]
Quasi Notation
x <- [q|Likes -> *|]
3. R c q
Runs a transitive query on the targets of all such relationships.
q can either be Q d or Q' d f, depending if you want to also run a filter or not.
Similar to the previous case, it will limit the query to only entities which have such a relationship with at least one entity which matches the transitive query.
Example
x <- query (R @Likes (Q (C @Name))
x <- query (R @Likes (Q' (C @Name) (With (C @Enemy))))
x :: [[Result Name]]
Quasi Notation
You just write the given query in the () following the arrow. / can be used to give it a filter.
For instance:
x <- [q|Likes -> (Name)|]
x <- [q|Likes -> (Name / With Enemy)|]
Constructors
| R b |
Instances
| (Component c, Queryable q out) => RelQuery 'Exclusive (R c (Q q)) out Source # | |
| (Component c, Queryable q out, Collectable f QueryFilter) => RelQuery 'Exclusive (R c (Q' q f)) out Source # | |
| Component c => RelQuery 'Exclusive (R c Any) (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => RelQuery 'Inclusive (R c Any) [Result (Rel c)] Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| (Component c, Queryable q out) => RelQuery 'Inclusive (R c (Q q)) [out] Source # | |
| (Component c, Queryable q out, Collectable f QueryFilter) => RelQuery 'Inclusive (R c (Q' q f)) [out] Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
| Component c => EraseIntoStorage (R c Entity, c -> Bool) CheckFilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => EraseIntoStorage (R c Any, c -> Bool) CheckFilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => EraseIntoStorage (R c Entity) FilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| Component c => EraseIntoStorage (R c Any) FilterType Source # | |
Defined in Mischief.ECS.World.Query.QueryFilter | |
| RelQuery (RelExclusivity c) (R c Any) out => Queryable (R c Any) out Source # | |
| RelQuery (RelExclusivity c) (R c (Q q)) out => Queryable (R c (Q q)) out Source # | |
| RelQuery (RelExclusivity c) (R c (Q' q f)) out => Queryable (R c (Q' q f)) out Source # | |
| Component c => Queryable (R c Entity) (Result (Rel c)) Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
Can be wrapped around any queryable marker to unwrap the inner value from the Results.
Example
x <- query (C @Name, Val (C @Name))
x :: [(Result Name, Name)]
y <- query (Val (C @Name, R @Likes Any))
y :: [(Name, [Rel Likes])]
Quasi Notation
Val
val
V
v
*
For instance:
x <- [q|Name, *Name|]
x <- [q|*(Name, Likes -> *)|]
Constructors
| Val a |
Instances
| (Queryable qd out, Mappable MapQueryVal out out') => Queryable (Val qd) out' Source # | |
Defined in Mischief.ECS.World.Query.Queryable | |
module Mischief.ECS.World.Query.TH
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.
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.
modify :: (Updateable (Result c), Settable (Result c) i, DeepValue (Result c) i) => Result c -> (i -> i) -> System () Source #
Modifies the value of the component with the given function.
The function will be applied over the live value of the component, adding some overhead.
If you are confident the value in the Result is the live one, or otherwise do not care of updating the live value,
you are encouraged to use modify' instead.
Note that this will trigger change detection even if the provided function is id.
modify' :: (Settable (Result c) i, DeepValue (Result c) i) => Result c -> (i -> i) -> System () Source #
Modifies the value of the component with the given function.
The function will be applied over the value contained within the Result, which is not guaranteed
to be the live value of the component.
If you wish to apply the function over the live value, use modify instead.
Note that this will trigger change detection even if the provided function is id.
spawn :: (HasCallStack, Bundle b) => b -> System Entity Source #
Spawn an entity given a bundle of components.
module Mischief.ECS.Resources
class Typeable e => Event e Source #
Event typeclass.
Instances
| (Typeable c, Typeable k) => Event (OnInsert c) Source # | |
Defined in Mischief.ECS.Events Methods eraseEvent :: OnInsert c -> ErasedEvent Source # | |
| (Typeable c, Typeable k) => Event (OnInsertRel c) Source # | |
Defined in Mischief.ECS.Events Methods eraseEvent :: OnInsertRel c -> ErasedEvent Source # | |
| (Typeable c, Typeable k) => Event (OnRemove c) Source # | |
Defined in Mischief.ECS.Events Methods eraseEvent :: OnRemove c -> ErasedEvent Source # | |
| (Typeable c, Typeable k) => Event (OnRemoveRel c) Source # | |
Defined in Mischief.ECS.Events Methods eraseEvent :: OnRemoveRel c -> ErasedEvent Source # | |
A System is a set of instructions applied over a World. It can be added to the App to be ran on a certain Schedule.
A system is actually a wrapper around , meaning you can ReaderT World IOask for the World,
or do IO operations by using liftIO.
Instances
| Applicative System Source # | |
| Functor System Source # | |
| Monad System Source # | |
| MonadFail System Source # | |
Defined in Mischief.ECS.World | |
| MonadIO System Source # | |
Defined in Mischief.ECS.World | |
| Defer System Source # | |
| PrimMonad System Source # | |
| SystemConfig (System ()) Source # | |
Defined in Mischief.ECS.App.SystemConfig Methods systemConfigData :: System () -> SystemConfigData Source # | |
| EraseIntoStorage (System ()) [System ()] Source # | |
| SystemConfig s1 => SystemConfig (SystemConfigModifier s1 (System ())) Source # | |
Defined in Mischief.ECS.App.SystemConfig Methods systemConfigData :: SystemConfigModifier s1 (System ()) -> SystemConfigData Source # | |
| Event (e c) => EraseIntoStorage (e c -> System ()) (Hooks c) Source # | |
| type PrimState System Source # | |
Defined in Mischief.ECS.World | |
Instances
| Show Time Source # | |||||
| Component Time Source # | |||||
Defined in Mischief.ECS.Time Associated Types
| |||||
| type RelExclusivity Time Source # | |||||
Defined in Mischief.ECS.Time | |||||
data TimePlugin Source #
Constructors
| TimePlugin |
Instances
| Eq TimePlugin Source # | |
Defined in Mischief.ECS.Time | |
| Plugin TimePlugin Source # | |
Defined in Mischief.ECS.Time | |
class (Typeable p, Eq p) => Plugin p where Source #
Minimal complete definition
Nothing
Instances
| Plugin TimePlugin Source # | |
Defined in Mischief.ECS.Time | |
Constructors
| First |
data PostStartup Source #
Constructors
| PostStartup |
Instances
| Schedule PostStartup Source # | |
Defined in Mischief.ECS.App.Schedules | |
data PostUpdate Source #
Constructors
| PostUpdate |
Instances
| Schedule PostUpdate Source # | |
Defined in Mischief.ECS.App.Schedules | |
data PreStartup Source #
Constructors
| PreStartup |
Instances
| Schedule PreStartup Source # | |
Defined in Mischief.ECS.App.Schedules | |
Constructors
| Startup |
Constructors
| Update |
module Mischief.ECS.Log
unwrap :: HasCallStack => Maybe a -> a Source #
expect :: HasCallStack => forall (m :: Type -> Type) w a. MonadSystem w m => Text -> Maybe a -> m a Source #