fresco-binding-0.3.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

(#:) :: Serialise 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

Eq Entity Source # 

Methods

(==) :: Entity -> Entity -> Bool #

(/=) :: Entity -> Entity -> Bool #

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

creates an Entity

delE :: Entity -> IO () Source #

destroys an Entity

idE :: Entity -> IO ByteString Source #

gets id of an Entity

readC :: Serialise a => Entity -> ComponentType a -> IO a Source #

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

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

updates one ComponentType

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

sets one ComponentType

data ObjectLibSystem Source #

Constructors

ObjectLibSystem (Ptr ()) 

data CallbackSystem Source #

Constructors

CallbackSystem (Ptr ())