fresco-binding-0.1.0: Fresco binding for Haskell

Safe HaskellNone
LanguageHaskell98

Fresco.Entity

Contents

Description

Entity of the Entity ComponentType System for Fresco Haskell Binding

Synopsis

EntityData Type

(#:) :: ComponentClass a => ComponentType a -> a -> (Word64, Component) Source

pair builder for nice construction syntax, allows [ ct #: val, ...] syntax

Entity Type

data Entity Source

ERef, composable objects, referenced Entities with listeners

Constructors

Entity (Ptr ()) 

Instances

newE :: [(Word64, Component)] -> IO Entity Source

creates an Entity

readC :: ComponentClass a => Entity -> ComponentType a -> IO a Source

reads one ComponentType, throws exception, if ComponentType not present, or wrong type

updateC :: ComponentClass a => Entity -> ComponentType a -> (a -> a) -> IO () Source

updates one ComponentType

setC :: ComponentClass a => Entity -> ComponentType a -> a -> IO () Source

sets one ComponentType

data CallbackSystem Source

Constructors

CallbackSystem (Ptr ())