diff options
Diffstat (limited to 'src/Input.elm')
-rw-r--r-- | src/Input.elm | 10 |
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 |