aztecs-0.14.0: A modular game engine and Entity-Component-System (ECS) for Haskell.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Aztecs.ECS.Class

Synopsis

Documentation

class ECS (m :: Type -> Type) where Source #

Entity Component System (ECS) implementation.

Associated Types

type Entity (m :: Type -> Type) Source #

Entity identifier.

type Task (m :: Type -> Type) :: Type -> Type Source #

Task monad for running systems.

Methods

spawn :: Bundle (Entity m) m -> m (Entity m) Source #

Spawn a new entity with a Bundle of components.

insert :: Entity m -> Bundle (Entity m) m -> m () Source #

Insert a Bundle of components into an existing entity (otherwise this will do nothing).

remove :: Entity m -> m () Source #

Remove an entity and its components.

task :: Task m a -> m a Source #

Run a Task.

Instances

Instances details
PrimMonad m => ECS (AztecsT cs m) Source # 
Instance details

Defined in Aztecs.Internal

Associated Types

type Entity (AztecsT cs m) 
Instance details

Defined in Aztecs.Internal

type Entity (AztecsT cs m) = Entity
type Task (AztecsT cs m) 
Instance details

Defined in Aztecs.Internal

type Task (AztecsT cs m) = Commands (AztecsT cs) m

Methods

spawn :: Bundle (Entity (AztecsT cs m)) (AztecsT cs m) -> AztecsT cs m (Entity (AztecsT cs m)) Source #

insert :: Entity (AztecsT cs m) -> Bundle (Entity (AztecsT cs m)) (AztecsT cs m) -> AztecsT cs m () Source #

remove :: Entity (AztecsT cs m) -> AztecsT cs m () Source #

task :: Task (AztecsT cs m) a -> AztecsT cs m a Source #