Safe Haskell | None |
---|---|
Language | Haskell2010 |
MapEditor
Synopsis
- data MapEditorState = Game {
- currentBall :: Maybe EnemyPeg
- mapInfo :: MapInfo
- metaInfo :: MetaInfo
- backgroundFiles :: [String]
- changeIndex :: Int -> Int -> Int -> Int
- changeRadius :: Maybe EnemyPeg -> Float -> Maybe EnemyPeg
- changeBallType :: Maybe EnemyPeg -> Int -> Maybe EnemyPeg
- inBoundaries :: Coords -> Float -> Bool
- handleKeys :: Event -> MapEditorState -> MapEditorState
- emptyMap :: MapInfo
- editorStateFrom :: MapInfo -> MetaInfo -> [String] -> MapEditorState
- render :: MapEditorState -> Picture
- update :: Float -> MapEditorState -> MapEditorState
- moveCurBall :: MapEditorState -> MapEditorState
Documentation
data MapEditorState #
A data structure to hold the state of the map editor.
Constructors
Game | |
Fields
|
Instances
Show MapEditorState # | |
Defined in MapEditor Methods showsPrec :: Int -> MapEditorState -> ShowS # show :: MapEditorState -> String # showList :: [MapEditorState] -> ShowS # |
Arguments
:: Int | Current index. |
-> Int | Delta for addition. |
-> Int | Current length of |
-> Int | New index. |
Retrun index after performing and addition operation with delta
Change radius of ball on delta.
Arguments
:: Maybe EnemyPeg | Current ball. |
-> Int | Delta. |
-> Maybe EnemyPeg | New ball with changed durability. |
Change durability of ball with its type.
Check weather ball with Coords
is in boundaries.
Arguments
:: Event | Event. |
-> MapEditorState | Current state of map editor. |
-> MapEditorState | New map state of map editor. |
Change background on previous picture with arrow Left.
Arguments
:: MapInfo | Input |
-> MetaInfo | Input |
-> [String] | Input array of picture names. |
-> MapEditorState | Output |
Get editor state from map, and meta-info.
Arguments
:: MapEditorState | The map state to render. |
-> Picture | The output picture. |
Renderer of MapEditorState
.
Arguments
:: Float | |
-> MapEditorState | Input |
-> MapEditorState | Output |
Update the game by moving the ball.
Arguments
:: MapEditorState |
|
-> MapEditorState |
|
Move current ball using current mouse position.