aboutsummaryrefslogtreecommitdiff
path: root/src/Input.elm
diff options
context:
space:
mode:
authorJoris2015-12-30 01:03:47 +0100
committerJoris2015-12-30 01:03:47 +0100
commit1cf6bc1ad9209e4f3f2fcbc129f2577e74e94c99 (patch)
tree169e799b2d901a5f89829db8a82c79133e169474 /src/Input.elm
parent79a9db1c532995c7c760bfb518b43d92dd703280 (diff)
Upgrade to elm 0.16.0
Diffstat (limited to 'src/Input.elm')
-rw-r--r--src/Input.elm10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Input.elm b/src/Input.elm
index 0497107..e18d8be 100644
--- a/src/Input.elm
+++ b/src/Input.elm
@@ -1,7 +1,7 @@
module Input where
-import Char exposing (toCode)
-import Keyboard exposing (KeyCode, keysDown, arrows, isDown)
+import Char exposing (toCode, KeyCode)
+import Keyboard exposing (keysDown, arrows, isDown)
import Random
import Time exposing (Time, fps)
import Signal exposing (..)
@@ -18,11 +18,7 @@ type alias Input =
getInput : Signal Input
getInput =
let delta = fps 24
- input =
- Input
- <~ map recordIntToVec2 arrows
- ~ keysDown
- ~ delta
+ input = map3 Input (map recordIntToVec2 arrows) keysDown delta
in sampleOn delta input
recordIntToVec2 : {x : Int, y : Int} -> Vec2