apecs-0.9.0: Fast Entity-Component-System library for game programming

Safe HaskellNone
LanguageHaskell2010

Apecs.Util

Contents

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.