mischief-ecs
Safe HaskellNone
LanguageGHC2024

Mischief.ECS.App

Synopsis

Documentation

data App Source #

The App is a wrapper around the World through which plugins can be added.

Constructors

App 

Fields

newApp :: IO App Source #

Create a new App.

addPlugin :: Plugin p => App -> IO () Source #

Add a plugin to the App.

runApp :: App -> IO () Source #

Run the App.

runSchedule :: forall {k} (sch :: k). Schedule sch => System () Source #

Run all systems of a Schedule.

register :: Component c => System () Source #

Register a Component. This is done automatically when inserting it for the first time.

toolsGet :: forall c m w. (MonadSystem w m, Component c) => Proxy c -> Entity -> m (Maybe c) Source #

toolsSet :: Bundle c => c -> Entity -> System () Source #

toolsGetRAny :: forall c m w. (Component c, MonadSystem w m, IsExclusiveRel c ~ 'False) => Proxy c -> Entity -> m (Maybe [Rel c]) Source #

tick :: System () Source #

Increment the World's Tick.