app

Safe Haskell None
Language Haskell2010

Cinema

Description

Module containing the base for animating scenes in lobbies

Synopsis

Documentation

data Actor #

Constructors

Actor  
Instances
Eq Actor #  
Instance details

Defined in Cinema

Methods

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

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

Ord Actor #  
Instance details

Defined in Cinema

Methods

compare :: Actor -> Actor -> Ordering #

(<) :: Actor -> Actor -> Bool #

(<=) :: Actor -> Actor -> Bool #

(>) :: Actor -> Actor -> Bool #

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

max :: Actor -> Actor -> Actor #

min :: Actor -> Actor -> Actor #

Show Actor #  
Instance details

Defined in Cinema

Methods

showsPrec :: Int -> Actor -> ShowS #

show :: Actor -> String #

showList :: [Actor] -> ShowS #

Generic Actor #  
Instance details

Defined in Cinema

Associated Types

type Rep Actor :: Type -> Type #

Methods

from :: Actor -> Rep Actor x #

to :: Rep Actor x -> Actor #

type Rep Actor #  
Instance details

Defined in Cinema

data ActorKind #

Constructors

CreatureKind  
TileKind  
Instances
Eq ActorKind #  
Instance details

Defined in Cinema

Methods

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

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

Ord ActorKind #  
Instance details

Defined in Cinema

Show ActorKind #  
Instance details

Defined in Cinema

data ActorState #

Constructors

ActorState  

Fields

Instances
Eq ActorState #  
Instance details

Defined in Cinema

Ord ActorState #  
Instance details

Defined in Cinema

Show ActorState #  
Instance details

Defined in Cinema

Generic ActorState #  
Instance details

Defined in Cinema

Associated Types

type Rep ActorState :: Type -> Type #

type Rep ActorState #  
Instance details

Defined in Cinema

data Direction #

Constructors

ToLeft  
ToRight  
Instances
Eq Direction #  
Instance details

Defined in Cinema

Methods

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

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

Ord Direction #  
Instance details

Defined in Cinema

Show Direction #  
Instance details

Defined in Cinema

Generic Direction #  
Instance details

Defined in Cinema

Associated Types

type Rep Direction :: Type -> Type #

Methods

from :: Direction -> Rep Direction x #

to :: Rep Direction x -> Direction #

type Rep Direction #  
Instance details

Defined in Cinema

type Rep Direction = D1 (MetaData "Direction" "Cinema" "main" False) (C1 (MetaCons "ToLeft" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ToRight" PrefixI False) (U1 :: Type -> Type))

data Element #

Instances
Eq Element #  
Instance details

Defined in Cinema

Methods

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

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

Ord Element #  
Instance details

Defined in Cinema

Show Element #  
Instance details

Defined in Cinema

Methods

showsPrec :: Int -> Element -> ShowS #

show :: Element -> String #

showList :: [Element] -> ShowS #

Generic Element #  
Instance details

Defined in Cinema

Associated Types

type Rep Element :: Type -> Type #

Methods

from :: Element -> Rep Element x #

to :: Rep Element x -> Element #

type Rep Element #  
Instance details

Defined in Cinema

newtype Frame #

Constructors

Frame  

Fields

Instances
Eq Frame #  
Instance details

Defined in Cinema

Methods

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

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

Ord Frame #  
Instance details

Defined in Cinema

Methods

compare :: Frame -> Frame -> Ordering #

(<) :: Frame -> Frame -> Bool #

(<=) :: Frame -> Frame -> Bool #

(>) :: Frame -> Frame -> Bool #

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

max :: Frame -> Frame -> Frame #

min :: Frame -> Frame -> Frame #

Show Frame #  
Instance details

Defined in Cinema

Methods

showsPrec :: Int -> Frame -> ShowS #

show :: Frame -> String #

showList :: [Frame] -> ShowS #

Generic Frame #  
Instance details

Defined in Cinema

Associated Types

type Rep Frame :: Type -> Type #

Methods

from :: Frame -> Rep Frame x #

to :: Rep Frame x -> Frame #

type Rep Frame #  
Instance details

Defined in Cinema

type Rep Frame = D1 (MetaData "Frame" "Cinema" "main" True) (C1 (MetaCons "Frame" PrefixI True) (S1 (MetaSel (Just "unFrame") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map Element Actor))))

type Scene = Program SceneInstruction #

data TimedFrame #

Constructors

TimedFrame  

Fields

  • duration :: Duration

    The duration of a frame, in tenth of seconds

  • frame :: Frame

    The frame

Instances
Eq TimedFrame #  
Instance details

Defined in Cinema

Ord TimedFrame #  
Instance details

Defined in Cinema

Show TimedFrame #  
Instance details

Defined in Cinema

Generic TimedFrame #  
Instance details

Defined in Cinema

Associated Types

type Rep TimedFrame :: Type -> Type #

type Rep TimedFrame #  
Instance details

Defined in Cinema

(|||) :: Scene () -> Scene () -> Scene () #

dress :: Sprite -> Element -> Scene () #

down :: Element -> Scene () #

dot :: Element -> (ActorState -> a) -> Scene a #

Typical usage: archerX <- archer dot x

fork :: Scene () -> Scene () #

forkWithId :: Scene () -> Scene ThreadId #

joinThread :: ThreadId -> Scene () #

hide :: Element -> Scene () #

left :: Element -> Scene () #

newActorAt :: String -> Sprite -> Int -> Int -> Scene Element #

newActorAt' :: String -> Sprite -> Direction -> Int -> Int -> Scene Element #

right :: Element -> Scene () #

spriteToKind :: Sprite -> ActorKind #

tell :: String -> Element -> Scene () #

tileSprite :: Tile -> Sprite #

up :: Element -> Scene () #

during :: Duration -> Scene a -> Scene a #

moveTo :: Int -> Int -> Element -> Scene () #

resetAt :: Sprite -> Int -> Int -> Element -> Scene () #

resetAt' :: Sprite -> Direction -> Int -> Int -> Element -> Scene () #

wait :: Duration -> Scene () #