apecs-0.9.3: Fast Entity-Component-System library for game programming
Safe HaskellNone
LanguageHaskell2010

Apecs.Util

Synopsis

Utility

runGC :: System w () Source #

Explicitly invoke the garbage collector

global :: Entity Source #

Convenience entity, for use in places where the entity value does not matter, i.e. a global store.

EntityCounter

newtype EntityCounter Source #

Component used by newEntity to track the number of issued entities. Automatically added to any world created with makeWorld

Constructors

EntityCounter 

Fields

nextEntity :: (MonadIO m, Get w m EntityCounter) => SystemT w m Entity Source #

Bumps the EntityCounter and yields its value

newEntity :: (MonadIO m, Set w m c, Get w m EntityCounter) => c -> SystemT w m Entity Source #

Writes the given components to a new entity, and yields that entity. The return value is often ignored.

newEntity_ :: (MonadIO m, Set world m component, Get world m EntityCounter) => component -> SystemT world m () Source #

Writes the given components to a new entity without yelding the result. Used mostly for convenience.