Copyright | (c) Anton Gushcha, 2015-2016 |
---|---|
License | BSD3 |
Maintainer | ncrashed@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- data GameWireIndexed m i a b = GameWireIndexed {
- indexedId :: i
- indexedWire :: GameWire m a b
- type GameActor m i a b = GameMonadT m (GameWireIndexed m i a b)
- updateIndexedWire :: (GameWire m a b -> GameWire m a b) -> GameWireIndexed m i a b -> GameWireIndexed m i a b
- postActorAction :: Monad m => GameActor m i a b -> (i -> GameWire m b c) -> GameActor m i a c
- preActorAction :: Monad m => (i -> GameWire m c a) -> GameActor m i a b -> GameActor m i c b
Documentation
data GameWireIndexed m i a b Source
Game wire that has its own id
GameWireIndexed | |
|
Eq i => Eq (GameWireIndexed m i a b) Source | Equality by equality of ids |
type GameActor m i a b = GameMonadT m (GameWireIndexed m i a b) Source
Common pattern in game for creating incapsulated objects
Usually wires that are actors need context to register themselfes in core. Major part of wire functions operates with such wrapped indexed arrows thats why the convinient type synonym is exists.
updateIndexedWire :: (GameWire m a b -> GameWire m a b) -> GameWireIndexed m i a b -> GameWireIndexed m i a b Source
Replaces controlling wire in indexed wire