Skip to content

Commit

Permalink
Merge wasd, arrows and new numpad library to signals
Browse files Browse the repository at this point in the history
  • Loading branch information
chendrix committed Jun 22, 2015
1 parent c3148e6 commit b7ed83d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion elm-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"dependencies": {
"elm-lang/core": "2.0.1 <= v < 3.0.0",
"deadfoxygrandpa/Elm-Test" : "1.0.4 <= v < 2.0.0",
"maxsnew/IO" : "0.1.5 <= v < 2.0.0"
"maxsnew/IO" : "0.1.5 <= v < 2.0.0",
"chendrix/elm-numpad" : "1.0.1 <= v < 2.0.0"
},
"elm-version": "0.15.0 <= v < 0.16.0"
}
14 changes: 6 additions & 8 deletions src/Rogue.elm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Rogue where

import Keyboard
import Time exposing (..)
import Numpad

import Rogue.Model exposing (..)
import Rogue.Update exposing (..)
Expand All @@ -12,16 +12,14 @@ import Rogue.View exposing (..)
main =
Signal.map view gameState


gameState : Signal Game
gameState =
Signal.foldp update defaultGame input


delta =
Signal.map inSeconds (fps 35)


input : Signal Input
input =
Signal.map Input Keyboard.wasd
Signal.map Input <| Signal.mergeMany
[ Keyboard.wasd
, Keyboard.arrows
, Numpad.numpad
]

0 comments on commit b7ed83d

Please sign in to comment.