Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module containing the base for animating scenes in lobbies
Synopsis
-
data Actor = Actor {
- actorName :: Maybe String
- actorState :: ActorState
-
data ActorKind
- = CreatureKind
- | TileKind
- data ActorState = ActorState {}
- data Direction
- data Element
- newtype Frame = Frame {}
- type Scene = Program SceneInstruction
- data TimedFrame = TimedFrame {}
- (|||) :: Scene () -> Scene () -> Scene ()
- creatureSprite :: CreatureID -> Sprite
- defaultDirection :: Direction
- dress :: Sprite -> Element -> Scene ()
- down :: Element -> Scene ()
- dot :: Element -> (ActorState -> a) -> Scene a
- getActorState :: Element -> Scene ActorState
- fork :: Scene () -> Scene ()
- forkWithId :: Scene () -> Scene ThreadId
- joinThread :: ThreadId -> Scene ()
- hide :: Element -> Scene ()
- left :: Element -> Scene ()
- newActor :: Maybe String -> ActorState -> Scene Element
- newActorAt :: String -> Sprite -> Int -> Int -> Scene Element
- newActorAt' :: String -> Sprite -> Direction -> Int -> Int -> Scene Element
- render :: Scene () -> [TimedFrame]
- right :: Element -> Scene ()
- setActorState :: Element -> ActorState -> Scene ()
- shutup :: Element -> Scene ()
- spriteToKind :: Sprite -> ActorKind
- tell :: String -> Element -> Scene ()
- tileSprite :: Tile -> Sprite
- turnAround :: Element -> Scene ()
- up :: Element -> Scene ()
- during :: Duration -> Scene a -> Scene a
- (=:) :: Element -> ActorState -> Scene ()
- newHiddenActor :: String -> Scene Element
- moveTo :: Int -> Int -> Element -> Scene ()
- resetAt :: Sprite -> Int -> Int -> Element -> Scene ()
- turnTo :: Direction -> Element -> Scene ()
- resetAt' :: Sprite -> Direction -> Int -> Int -> Element -> Scene ()
- wait :: Duration -> Scene ()
Documentation
Instances
Eq Actor # | |
Ord Actor # | |
Show Actor # | |
Generic Actor # | |
type Rep Actor # | |
Defined in Cinema
type Rep Actor = D1 (MetaData "Actor" "Cinema" "main" False) (C1 (MetaCons "Actor" PrefixI True) (S1 (MetaSel (Just "actorName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "actorState") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ActorState))) |
data ActorState #
Instances
Eq ActorState # | |
Defined in Cinema (==) :: ActorState -> ActorState -> Bool # (/=) :: ActorState -> ActorState -> Bool # | |
Ord ActorState # | |
Defined in Cinema compare :: ActorState -> ActorState -> Ordering # (<) :: ActorState -> ActorState -> Bool # (<=) :: ActorState -> ActorState -> Bool # (>) :: ActorState -> ActorState -> Bool # (>=) :: ActorState -> ActorState -> Bool # max :: ActorState -> ActorState -> ActorState # min :: ActorState -> ActorState -> ActorState # | |
Show ActorState # | |
Defined in Cinema showsPrec :: Int -> ActorState -> ShowS # show :: ActorState -> String # showList :: [ActorState] -> ShowS # | |
Generic ActorState # | |
Defined in Cinema type Rep ActorState :: Type -> Type # from :: ActorState -> Rep ActorState x # to :: Rep ActorState x -> ActorState # | |
type Rep ActorState # | |
Defined in Cinema |
data TimedFrame #
Instances
Eq TimedFrame # | |
Defined in Cinema (==) :: TimedFrame -> TimedFrame -> Bool # (/=) :: TimedFrame -> TimedFrame -> Bool # | |
Ord TimedFrame # | |
Defined in Cinema compare :: TimedFrame -> TimedFrame -> Ordering # (<) :: TimedFrame -> TimedFrame -> Bool # (<=) :: TimedFrame -> TimedFrame -> Bool # (>) :: TimedFrame -> TimedFrame -> Bool # (>=) :: TimedFrame -> TimedFrame -> Bool # max :: TimedFrame -> TimedFrame -> TimedFrame # min :: TimedFrame -> TimedFrame -> TimedFrame # | |
Show TimedFrame # | |
Defined in Cinema showsPrec :: Int -> TimedFrame -> ShowS # show :: TimedFrame -> String # showList :: [TimedFrame] -> ShowS # | |
Generic TimedFrame # | |
Defined in Cinema type Rep TimedFrame :: Type -> Type # from :: TimedFrame -> Rep TimedFrame x # to :: Rep TimedFrame x -> TimedFrame # | |
type Rep TimedFrame # | |
Defined in Cinema |
creatureSprite :: CreatureID -> Sprite #
getActorState :: Element -> Scene ActorState #
forkWithId :: Scene () -> Scene ThreadId #
joinThread :: ThreadId -> Scene () #
render :: Scene () -> [TimedFrame] #
setActorState :: Element -> ActorState -> Scene () #
spriteToKind :: Sprite -> ActorKind #
tileSprite :: Tile -> Sprite #
turnAround :: Element -> Scene () #
(=:) :: Element -> ActorState -> Scene () #
newHiddenActor :: String -> Scene Element #