Safe Haskell | None |
---|---|
Language | Haskell98 |
Entity of the Entity ComponentType System for Fresco Haskell Binding
- (#:) :: Serialise a => ComponentType a -> a -> (Word64, Component)
- data Entity = Entity (Ptr ())
- newE :: [(Word64, Component)] -> IO Entity
- delE :: Entity -> IO ()
- idE :: Entity -> IO ByteString
- readC :: Serialise a => Entity -> ComponentType a -> IO a
- updateC :: Serialise a => Entity -> ComponentType a -> (a -> a) -> IO ()
- setC :: Serialise a => Entity -> ComponentType a -> a -> IO ()
- data ObjectLibSystem = ObjectLibSystem (Ptr ())
- createOLS :: IO ObjectLibSystem
- stepOLS :: ObjectLibSystem -> IO ()
- addEntityOLS :: ObjectLibSystem -> Entity -> IO ()
- data CallbackSystem = CallbackSystem (Ptr ())
- createCBS :: IO CallbackSystem
- stepCBS :: CallbackSystem -> IO ()
- registerReceiverCBS :: Serialise a => CallbackSystem -> Entity -> ComponentType a -> (a -> IO ()) -> IO ()
EntityData Type
(#:) :: Serialise a => ComponentType a -> a -> (Word64, Component) Source #
pair builder for nice construction syntax, allows [ ct #: val, ...] syntax
Entity Type
ERef, composable objects, referenced Entities with listeners
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
data ObjectLibSystem Source #
ObjectLibSystem (Ptr ()) |
stepOLS :: ObjectLibSystem -> IO () Source #
addEntityOLS :: ObjectLibSystem -> Entity -> IO () Source #
data CallbackSystem Source #
CallbackSystem (Ptr ()) |
stepCBS :: CallbackSystem -> IO () Source #
registerReceiverCBS :: Serialise a => CallbackSystem -> Entity -> ComponentType a -> (a -> IO ()) -> IO () Source #